OFFSET
1,2
EXAMPLE
The sum of the digits of 22620 is 2 + 2 + 6 + 2 + 0 = 12 and 12 + 12^2 + 12^3 + 12^4 = 22620.
MAPLE
S:=proc(w) local x; x:=add(x, x=convert(w, base, 10)); end:
P:= proc(q) local a, k, n; for n from 1 to q do a:=S(n); k:=1;
while a<n do k:=k+1; a:=a+S(n)^k; od; if a=n then print(n); fi; od; end: P(10^8);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, May 03 2017
STATUS
approved