

A258881


a(n) = n + the sum of the squared digits of n.


8



0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 11, 13, 17, 23, 31, 41, 53, 67, 83, 101, 24, 26, 30, 36, 44, 54, 66, 80, 96, 114, 39, 41, 45, 51, 59, 69, 81, 95, 111, 129, 56, 58, 62, 68, 76, 86, 98, 112, 128, 146, 75, 77, 81, 87, 95, 105, 117, 131, 147, 165, 96, 98, 102
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS

Table of n, a(n) for n=0..62.
Carlos Rivera, Puzzle 776. Ten consecutive integers such that..., The Prime Puzzles and Problems Connection, March 2015.


MATHEMATICA

Total[Flatten@ {#, IntegerDigits[#]^2}] & /@ Range[0, 61] (* Michael De Vlieger, Jul 20 2015 *)
Table[n+Total[IntegerDigits[n]^2], {n, 0, 100}] (* Harvey P. Dale, Nov 27 2022 *)


PROG

(PARI) A258881(n)=n+norml2(digits(n))
(Python)
def ssd(n): return sum(int(d)**2 for d in str(n))
def a(n): return n + ssd(n)
print([a(n) for n in range(63)]) # Michael S. Branicky, Jan 30 2021


CROSSREFS

Cf. A003132, A062028, A259391, A259567, A033936, A076161 (indices of primes), A329179 (indices of squares).
Sequence in context: A160926 A077253 A098734 * A160942 A160929 A103505
Adjacent sequences: A258878 A258879 A258880 * A258882 A258883 A258884


KEYWORD

nonn,base,easy,changed


AUTHOR

M. F. Hasler, Jul 19 2015


STATUS

approved



