login
A079206
Numbers n in which the first K digits of n form an integer divisible by the K-th prime, for K = 1, 2, ..., M, where M is the number of digits in n.
4
2, 4, 6, 8, 21, 24, 27, 42, 45, 48, 60, 63, 66, 69, 81, 84, 87, 210, 215, 240, 245, 270, 275, 420, 425, 450, 455, 480, 485, 600, 605, 630, 635, 660, 665, 690, 695, 810, 815, 840, 845, 870, 875, 2100, 2107, 2156, 2401, 2408, 2450, 2457, 2702, 2709, 2751, 2758
OFFSET
1,1
COMMENTS
There are 200 terms in the sequence and 10-digit number 8757193191 is the largest number to satisfy the requirements. - Shyam Sunder Gupta, Aug 04 2013
LINKS
EXAMPLE
a(88)=21076 because 2 is divisible by the first prime 2, 21 by the second prime 3, 210 by the third prime 5, 2107 by the fourth prime 7, 21076 by the fifth prime 11.
MATHEMATICA
a = Table[j, {j, 2, 8, 2}]; r = 2; t = a; While[! a == {}, n = Length[a]; k = 1; b = {}; While[! k > n, z0 = a[[k]]; Do[z = 10*z0 + j; If[Mod[z, Prime[r]] == 0, b = Append[b, z]; t = Append[t, z]], {j, 0, 9}]; k++]; a = b; r++]; t (* Shyam Sunder Gupta, Aug 04 2013 *)
PROG
(Python)
P, R, m = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37], [2, 4, 6, 8], 1
a = R[:]
while len(R) > 0:
R = [t for t in (10*q+d for q in R for d in range(10)) if t%P[m]==0]
a, m = a + R, m+1
print(a) # Michael S. Branicky, Feb 02 2024
CROSSREFS
Sequence in context: A335209 A119261 A062285 * A265342 A335661 A230105
KEYWORD
base,fini,full,nonn
AUTHOR
Sudipta Das (juitech(AT)vsnl.net), Feb 03 2003
STATUS
approved