A258881 a(n) = n + the sum of the squared digits of n.
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
Offset: 0
Links
- Carlos Rivera, Puzzle 776. Ten consecutive integers such that..., The Prime Puzzles and Problems Connection, March 2015.
Crossrefs
Programs
-
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 *)
-
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