OFFSET
1,2
FORMULA
Sod_4 - sod_3 + sod_2 - sod_1 = sum(d(d-1)(d^2+1)), d's are digits of n.
EXAMPLE
214 = 2*(2-1)*(2^2+1) + 1*(1-1)*(1^2+1) + 4*(4-1)*(4^2+1);
224 = 2*(2-1)*(2^2+1) + 2*(2-1)*(2^2+1) + 4*(4-1)*(4^2+1).
MATHEMATICA
okQ[n_] := Module[{idn=IntegerDigits[n]}, n==Total[idn^4]-Total[idn^3]+Total[idn^2]-Total[idn]]; Select[Range[0, 5000], okQ] (* Harvey P. Dale, Jan 14 2011 *)
CROSSREFS
KEYWORD
fini,nonn,full,base
AUTHOR
Zak Seidov, Nov 01 2002
STATUS
approved