OFFSET
1,3
COMMENTS
'digit_sum' is the 'sum of the digits' as defined in A007953.
The number of terms < 10^k: 9, 20, 63, 160, 454, 1333, 3704, ..., .
So far, 3705 terms, 70.93% are congruent to 0 (mod 3), 8.26% congruent to 1 (mod 3) and 20.81% congruent to 2 (mod 3).
LINKS
Pieter Post and Robert G. Wilson v, Table of n, a(n) for n = 1..3705
FORMULA
All numbers of the form 10^p are members; for n = 1-9, a(n)=n are trivial solutions.
EXAMPLE
57 is in the sequence because digit_sum(57) + digit_sum(57^2) + digit_sum(57^3) = 12 + 18 + 27 = 57. In this example, k is 3.
MAPLE
filter:= proc(n)
local t, p;
t:= 0;
for p from 1 while t < n do
t:= t+ sod(n^p);
od:
evalb(t = n)
end proc:
select(filter, [$1..1000]); # Robert Israel, Aug 16 2015
MATHEMATICA
fQ[n_] := If[ IntegerQ@ Log10@ n, True, Block[{pwr = 1, s = 0}, While[s = s + Plus @@ IntegerDigits[n^pwr]; s < n, pwr++]; s == n]]; Select[ Range[0, 1000], fQ]
PROG
(PARI) is(n)=my(s); for(p=1, n, s+=sumdigits(n^p); if(s>=n, return(s==n))) \\ Charles R Greathouse IV, Aug 07 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pieter Post and Robert G. Wilson v, Jul 30 2015
STATUS
approved