A094450 Number of iterations of the sum of digits of the divisors of 10^n needed to reach 15.
12, 10, 16, 15, 3, 11, 4, 13, 6, 6, 5, 19, 16, 3, 11, 13, 19, 7, 5, 9, 6, 16, 16, 19, 5, 3, 12, 3, 18, 16, 4, 10, 6, 16, 18, 12, 4, 16, 12, 13, 12, 5, 12, 5, 20, 15, 16, 12, 4, 16, 4, 20, 5, 19, 4, 6, 21, 5, 6, 5, 21, 12, 5, 16, 13, 17, 6, 5, 7, 21, 20, 18, 12, 10, 6, 18, 13, 13, 6, 13, 15
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..1400
Programs
-
Mathematica
Table[Length[NestWhileList[Total[Flatten[IntegerDigits/@Divisors[#]]]&,10^n, #!= 15&]]-1,{n,90}] (* Harvey P. Dale, Mar 05 2019 *)
-
Python
from sympy import divisors def sd(n): return sum(map(int, str(n))) def f(n): return sum(sd(d) for d in divisors(n, generator=True)) def a(n): i, c = 10**n, 0 while i != 15: i = f(i); c += 1 return c print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Dec 10 2021