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.

A055016 Smallest number whose sum of squares of digits is n.

Original entry on oeis.org

0, 1, 11, 111, 2, 12, 112, 1112, 22, 3, 13, 113, 222, 23, 123, 1123, 4, 14, 33, 133, 24, 124, 233, 1233, 224, 5, 15, 115, 1115, 25, 125, 1125, 44, 144, 35, 135, 6, 16, 116, 1116, 26, 45, 145, 335, 226, 36, 136, 1136, 444, 7, 17, 117, 46, 27, 127, 1127, 246
Offset: 0

Views

Author

Henry Bottomley, May 31 2000

Keywords

Crossrefs

Cf. A003132 is inverse in sense that n=A003132(a(n)), though not necessarily a(A003132(n)).

Programs

  • PARI
    A055016(n,q=9,m)={ n>1||return(n); forstep(q=min(sqrtint(n),q),1,-1, m && n \ q^2 * #Str(q) > #Str(m) && break; t=eval(Str(A055016(n-q^2,q),q)); (!m || tM. F. Hasler, Jun 24 2015