OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
12 --> 1^4+2^4 = 17 --> 1^4+7^4 = 2402 --> 2^4+4^4+0^4+2^4 = 288 --> 2^4+8^4+8^4 = 8208.
MAPLE
V:= Vector(32805): V[8208]:= true:
g:= proc(n) local L, t;
add(t^4, t = convert(n, base, 10))
end proc:
f:= proc(n) local x, S; global V;
if n <= 32805 then
if V[n] <> 0 then return V[n]
else S:= [n]
fi
else S:= []
fi;
x:= n;
do
x:= g(x);
if V[x] <> 0 then
V[S]:= V[x];
return V[x]
elif member(x, S) then
V[S]:= false;
return false
fi;
if x <= 32805 then S:= [op(S), x] fi;
od;
end proc;
select(f, [$1..10000]); # Robert Israel, Sep 03 2020
MATHEMATICA
okQ[n] := MemberQ[NestList[Total[IntegerDigits[#]^4]&, n, 30], 8208]; Select[Range[1000], okQ]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Sergio Falcon, Aug 07 2020
STATUS
approved