OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
a(13)=14 because (1^2+3^2)+(1+3)=14.
MATHEMATICA
sd[n_]:=Module[{idn=IntegerDigits[n]}, Total[idn+idn^2]]; Array[sd, 80] (* Harvey P. Dale, Aug 12 2012 *)
PROG
(PARI) a(n)=my(d=digits(n)); sum(i=1, #d, d[i]^2)+sumdigits(n) \\ Charles R Greathouse IV, Nov 26 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Zak Seidov, Nov 01 2002
STATUS
approved