

A228007


The largest ndigit number whose first k digits are divisible by k^2 for k = 1..n.


0




OFFSET

1,1


COMMENTS

There are 7 terms in the sequence and the 7digit number 6480005 is the largest number to satisfy the requirements.


LINKS



EXAMPLE

There are nine onedigit numbers divisible by 1 and the largest is 9, so a(1)=9.
For twodigit numbers, the second digit must make it divisible by 2^2, which gives 96 as the largest to satisfy the requirement, so a(2)=96.


MATHEMATICA

a = Table[j, {j, 9}]; r = 2; t = {}; While[! a == {}, n = Length[a]; nmax = Last[a]; k = 1; b = {}; While[! k > n, z0 = a[[k]]; Do[z = 10*z0 + j; If[Mod[z, r*r] == 0, b = Append[b, z]], {j, 0, 9}]; k++]; AppendTo[t, nmax]; a = b; r++]; t


CROSSREFS



KEYWORD

nonn,base,fini,full


AUTHOR



STATUS

approved



