Post History
J, 23 bytes >:@]^:(>1#.1%1+i.)^:_&1 Try it online! >:@]^:(...)^:_&1 Increments from 1 while >1#.1%1+i. the harmonic sum up to that is less than the input
Answer
#1: Initial revision
# [J], 23 bytes >:@]^:(>1#.1%1+i.)^:_&1 [Try it online!][TIO-kywji3hl] [J]: http://jsoftware.com/ [TIO-kywji3hl]: https://tio.run/##y/qvpKegnqZga6WgrqNgoGAFxLp6Cs5BPm7/7awcYuOsNOwMlfUMVQ21M/U046zi1Qz/a/5PUzDkSlMwAmJjIDYBAA "J – Try It Online" ``` >:@]^:(...)^:_&1 Increments from 1 while >1#.1%1+i. the harmonic sum up to that is less than the input ```