findCoins =: {{ NB. The distance from the start (0) either always increases, or we find a coin. NB. This means we can calculate the new distance or next coin as y|lastCoin+offset NB. If this value is less than the last coin, we have a new coin. NB. If the value is larger than the last offset, we cannot have a new coin, so NB. we increase the offset. lastCoin =. x offset =. x coins =. lastCoin while. lastCoin > 1 do. tmpOffset =. y|lastCoin + offset if. tmpOffset > offset do. offset =. tmpOffset elseif. tmpOffset < lastCoin do. lastCoin =. tmpOffset coins =. coins,lastCoin end. end. coins }} problem700 =: +/ 1504170715041707 findCoins 4503599627370517