OFFSET
1,2
EXAMPLE
a(6)=36 since (first power) 3+6=9; (second power) 3^2+6^2=9+36=45 and 4+5=9; (third power) 3^3+6^3=27+216=243 and 2+4+3=9.
PROG
(PARI) dr(n) = if (n, (n-1)%9+1); \\ from A010888
dsq(n) = if (n, d = digits(n); sum(id = 1, #d, d[id]^2));
dcb(n) = if (n, d = digits(n); sum(id = 1, #d, d[id]^3));
ok(n) = (dr(n) == dr(dcb(n))) && (dr(n) == dr(dsq(n))); \\ Michel Marcus, Sep 24 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Sep 23 2013
EXTENSIONS
Title improved by Peter Bala, Sep 25 2013
STATUS
approved