Determine the largest integer A such that for K=1,2,3,...,length(A) the first K digits of A form an integer divisible by K.
For example, for 56165, 5 is divisible by 1, 56 is divisible by 2, 561 is divisible by 3, 5616 is divisible by 4 and 56165 is divisible by 5.
(In reply to
re: Comparison to expectation by Larry)
The .9 underperformance is all in the A=2 case: 45 vs 50 which is entirely because the first digit can't be zero.
What's surprising is it catches up pretty consistently from this point on.
|
Posted by Jer
on 2024-04-29 15:00:53 |