login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


The smallest n-digit number whose first k digits are divisible by k^2 for k = 1..n.
0

%I #18 Jan 14 2021 21:16:48

%S 1,12,126,1264,24325,243252,6480005

%N The smallest n-digit number whose first k digits are divisible by k^2 for k = 1..n.

%C There are 7 terms in the sequence and the 7-digit number 6480005 is the last number to satisfy the requirements.

%e There are nine one-digit numbers divisible by 1 and smallest is 1 so a(1)=1.

%e For two-digit numbers, the second digit must make it divisible by 2^2, which gives 12 as the smallest to satisfy the requirement, so a(2)=12.

%t a = Table[j, {j, 9}]; r = 2; t = {}; While[! a == {}, n = Length[a]; nmin = First[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, nmin]; a = b; r++]; t

%Y Cf. A079042.

%K nonn,base,fini,full

%O 1,2

%A _Shyam Sunder Gupta_, Aug 08 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 00:39 EDT 2024. Contains 376015 sequences. (Running on oeis4.)