login
A305706
a(n) = smallest m such that the sum of digits of n^m is greater than n, or 0 if no such m exists.
1
0, 0, 2, 2, 2, 2, 2, 2, 2, 3, 0, 4, 3, 2, 2, 3, 3, 2, 4, 3, 14, 4, 5, 4, 4, 5, 4, 5, 6, 6, 14, 5, 6, 5, 6, 6, 6, 5, 5, 6, 14, 7, 6, 8, 6, 7, 6, 8, 7, 7, 16, 6, 6, 8, 7, 8, 7, 7, 9, 7, 15, 8, 8, 7, 8, 8, 9, 8, 8, 8, 18, 12, 9, 9, 8, 9, 9, 9, 9, 9, 18, 10, 11, 11, 10, 11, 11, 10, 9, 10, 17, 11, 11, 10, 11, 10, 12, 12, 10, 11, 0
OFFSET
0,3
COMMENTS
a(n) = smallest m such that A007953(n^m) > n, or 0 if no such m exists.
If n is a term of A178501, then a(n) = 0. - Felix Fröhlich, Jun 10 2018
PROG
(PARI) a(n) = if(sumdigits(n) < 2, return(0), my(m=2); while(1, if(sumdigits(n^m) > n, return(m)); m++)) \\ Felix Fröhlich, Jun 10 2018
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Max Alekseyev, Jun 08 2018
STATUS
approved