cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jul 19 2015

Keywords

Crossrefs

Cf. A003132, A062028, A259391, A259567, A033936, A076161 (indices of primes), A329179 (indices of squares).

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