cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A247889 Least number k > 0 such that digsum(n^k) = n, or 0 if no such k exists.

Original entry on oeis.org

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

Views

Author

Derek Orr, Sep 25 2014

Keywords

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

Crossrefs

Cf. A124359 (a(n) > 0), A124367 (a(n) = 0), A007953, A152147.

Programs

  • 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])

Extensions

Data corrected (initial 1 removed, terminal 0 added) by Hans Havermann, Jul 13 2018