login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055016 Smallest number whose sum of squares of digits is n. 4

%I #10 Jan 02 2023 12:30:46

%S 0,1,11,111,2,12,112,1112,22,3,13,113,222,23,123,1123,4,14,33,133,24,

%T 124,233,1233,224,5,15,115,1115,25,125,1125,44,144,35,135,6,16,116,

%U 1116,26,45,145,335,226,36,136,1136,444,7,17,117,46,27,127,1127,246

%N Smallest number whose sum of squares of digits is n.

%H Zak Seidov, <a href="/A055016/b055016.txt">Table of n, a(n) for n = 0..600</a>

%H E. Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2015-June/014998.html">Sum of squares -- and a concatenation</a>, SeqFan list, June 23, 2015.

%o (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 || t<m) && m=t); m } \\ _M. F. Hasler_, Jun 24 2015

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

%K base,nonn

%O 0,3

%A _Henry Bottomley_, May 31 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 21:51 EDT 2024. Contains 371781 sequences. (Running on oeis4.)