login
A247889
Least number k > 0 such that digsum(n^k) = n, or 0 if no such k exists.
5
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 13, 0, 4, 0, 0, 4, 3, 3, 4, 0, 0, 7, 0, 0, 7, 5, 4, 0, 0, 0, 13, 0, 0, 7, 0, 6, 5, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 7, 0, 0, 0, 0, 8, 6, 0, 0, 0, 7, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 17, 9, 10, 0, 0, 10, 13, 0, 0, 0, 19, 14, 0, 0, 10, 0, 0, 10, 11, 0, 0
OFFSET
0,18
COMMENTS
a(10^n) = 0 for all n > 0.
a(n) = 0 if and only if n is in A124367, complement of A124359.
The PARI code uses that, if sumdigit(n^k) <> n until sumdigits(n^k) > 2n for the first time, then sumdigits(n^k) <> n for all larger k. This might not be true for all n, although statistically sumdigits(n^k) ~ 4.5*log_10(n')*k within a few % (n' = n with trailing 0's removed), when k is not too small. - M. F. Hasler, May 18 2017
LINKS
PROG
(PARI) A247889(n, L=2*n)= if(n<10||vecmin(digits(n-1))==9, return(n<10)); k=1; while(L >= s=sumdigits(n^k), if(s, return(k)); k++) \\ Renamed to A247889 for use in A124359, A124367 (and elsewhere?), and minor edits by M. F. Hasler, May 18 2017
apply(A247889, [0..100])
CROSSREFS
Cf. A124359 (a(n) > 0), A124367 (a(n) = 0), A007953, A152147.
Sequence in context: A100543 A039928 A374828 * A309012 A137259 A166553
KEYWORD
nonn,base
AUTHOR
Derek Orr, Sep 25 2014
EXTENSIONS
Data corrected (initial 1 removed, terminal 0 added) by Hans Havermann, Jul 13 2018
STATUS
approved