OFFSET
1,2
COMMENTS
a(27) > 4*10^11. - Giovanni Resta, Apr 08 2016
LINKS
EXAMPLE
2^3 + 0^3 = 8 and phi(20) = 8;
2^4 + 8^4 + 2^4 + 4^4 + 8^4 = 8480 and phi(28248) = 8480.
MAPLE
with(numtheory); P:= proc(q) local a, b, c, d, k, n, ok; print(1); for n from 2 to q do d:=phi(n); a:=[]; b:=n; ok:=0;
for k from 1 to ilog10(n)+1 do if (b mod 10)>1 then ok:=1; fi; a:=[(b mod 10), op(a)]; b:=trunc(b/10); od; b:=-1; c:=0;
if ok=1 then while c<d do b:=b+1;
if b>0 then c:=add(a[k]^b, k=1..nops(a)); else for k from 1 to nops(a) do if a[k]=0 then c:=0; break; else c:=c+1; fi; od; fi; od; if c=d then print(n); fi; fi; od; end: P(10^9);
MATHEMATICA
Select[Range[10^6], Function[k, AnyTrue[Total[IntegerDigits[k]^#] & /@ Range@ 6, # == EulerPhi@ k &]]] (* Michael De Vlieger, Mar 03 2016, Version 10 *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Paolo P. Lava, Mar 03 2016
EXTENSIONS
a(20)-a(26) from Giovanni Resta, Apr 08 2016
STATUS
approved