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.

A067552 a(n) = SumOfDigits(n)^2 - SumOfDigits(n^2), where SumOfDigits = A007953.

Original entry on oeis.org

0, 0, 0, 0, 9, 18, 27, 36, 54, 72, 0, 0, 0, 0, 9, 27, 36, 45, 72, 90, 0, 0, 0, 9, 18, 36, 45, 63, 81, 108, 0, 0, 18, 18, 36, 54, 63, 81, 108, 135, 9, 9, 18, 27, 45, 72, 90, 108, 135, 162, 18, 27, 36, 45, 63, 90, 108, 126, 153, 180, 27, 36, 45, 54, 81, 108, 126, 144, 180, 207
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 28 2002

Keywords

Comments

All terms are divisible by 9; see A069912 for the quotient. - Ivan Neretin, Sep 01 2016

Examples

			a(16) = SumOfDigits(16)^2 - SumOfDigits(16^2) = (1+6)^2 - SumOfDigits(256) = 7^2 - (2+5+6) = 49 - 13 = 36.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ IntegerDigits[n]^2 - Plus @@ (IntegerDigits[n^2]); Table[ f[n], {n, 0, 100}]
  • PARI
    a(n) = sumdigits(n)^2 - sumdigits(n^2); \\ Michel Marcus, Sep 01 2016

Formula

a(n) = A007953(n)^2 - A004159(n).

Extensions

Edited by Robert G. Wilson v, May 04 2002