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.

A061104 Smallest number whose sum of digits is n^2.

Original entry on oeis.org

0, 1, 4, 9, 79, 799, 9999, 499999, 19999999, 999999999, 199999999999, 49999999999999, 9999999999999999, 7999999999999999999, 7999999999999999999999, 9999999999999999999999999
Offset: 0

Views

Author

Amarnath Murthy, Apr 20 2001

Keywords

Examples

			a(5) = 799, 7 + 9 + 9 = 25 = 5^2.
		

Crossrefs

Programs

  • PARI
    a(n) = { (n^2%9 + 1)*10^(n^2\9) - 1 } \\ Harry J. Smith, Jul 18 2009

Formula

a(n) = A051885(n^2).
a(n) = ((n^2 mod 9) + 1)*10^floor(n^2/9) - 1. - Henry Bottomley, Apr 24 2001