login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k that divide the number formed by the first k decimal digits of e (A039920(k)).
0

%I #18 Dec 29 2022 09:13:53

%S 1,9,13,15,220,1610,1822,4879,61992,124838,604739,771780,802771,

%T 915973,918868,2722883,3466893

%N Numbers k that divide the number formed by the first k decimal digits of e (A039920(k)).

%t d = Drop[ First[ RealDigits[E, 10, 10^5 +1]], 1]; Do[ If[ IntegerQ[ FromDigits[Take[d, n]]/n], Print[n]], {n, 1, 65240} ]

%o (Python)

%o from sympy import E

%o digits_of_e = str(E.n(13*10**4))[2:] # or load data from file

%o def afind():

%o kint = 0

%o for k in range(1, len(digits_of_e)):

%o kint *= 10

%o kint += int(digits_of_e[k-1])

%o if kint%k == 0: print(k, end=", ")

%o afind() # _Michael S. Branicky_, Dec 28 2022

%Y Cf. A039920.

%K nonn,base,more

%O 1,2

%A _Jason Earls_, Dec 09 2001

%E a(9) from _Robert G. Wilson v_, Dec 10 2001

%E a(10)-a(17) from _Michael S. Branicky_, Dec 28 2022