OFFSET
1,1
COMMENTS
First non-occurrence happens with exponent 105. There is no x such that sum-of-digits{x^105}=x (x>1). - Patrick De Geest, Aug 15 1998
REFERENCES
G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 208-210.
Joe Roberts, "Lure of the Integers", The Mathematical Association of America, 1992, p. 172.
LINKS
Carole Dubois, Table of n, a(n) for n = 1..4522 (terms 1..1000 from T. D. Noe).
Carole Dubois, Scatterplot of A046017
EXAMPLE
a(3) = 8 since 8^3 = 512 and 5+1+2 = 8; a(5) = 28 because 28 is least number > 1 with 28^5 = 17210368, 1+7+2+1+0+3+6+8 = 28. 53^7 = 1174711139837 -> 1+1+7+4+7+1+1+1+3+9+8+3+7 = 53.
a(10) = 82 because 82^10 = 13744803133596058624 and 1 + 3 + 7 + 4 + 4 + 8 + 0 + 3 + 1 + 3 + 3 + 5 + 9 + 6 + 0 + 5 + 8 + 6 + 2 + 4 = 82.
a(13) = 20: 20^13=81920000000000000, 8+1+9+2=20.
a(17) = 80: 80^17=225179981368524800000000000000000, 2+2+5+1+7+9+9+8+1+3+6+8+5+2+4+8 = 80.
MATHEMATICA
a[n_] := For[k = 2, k <= 20*n, k++, Which[k == Total[IntegerDigits[k^n]], Return[k], k == 20*n, Return[0]]]; Table[a[n] , {n, 1, 105}] (* Jean-François Alcover, May 23 2012 *)
sdk[n_]:=Module[{k=2}, While[k!=Total[IntegerDigits[k^n]], k++]; k]; Array[sdk, 70] (* Harvey P. Dale, Jan 07 2024 *)
PROG
(Python)
from itertools import chain
def c(k, n): return sum(map(int, str(k**n))) == k
def a(n):
if n == 0: return False
d, lim = 1, 1
while lim < n*9*d: d, lim = d+1, lim*10
m = next(k for k in chain(range(2, lim+1), (0, )) if c(k, n))
return m
print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Jul 06 2022
CROSSREFS
KEYWORD
base,nonn,nice
AUTHOR
EXTENSIONS
More terms from Asher Auel, Jun 01 2000
STATUS
approved