The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A004434 Numbers that are the sum of 5 distinct nonzero squares. 9
55, 66, 75, 79, 82, 87, 88, 90, 94, 95, 99, 100, 103, 106, 110, 111, 114, 115, 118, 120, 121, 123, 126, 127, 129, 130, 131, 132, 134, 135, 138, 139, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 154, 155, 156, 157, 158, 159, 160, 162, 163 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Paul T. Bateman, Adolf J. Hildebrand, and George B. Purdy, Sums of distinct squares, Acta Arithmetica 67 (1994), pp. 349-380.
Franz Halter-Koch, Darstellung natürlicher Zahlen als Summe von Quadraten, Acta Arithmetica 42 (1982), pp. 11-20.
FORMULA
a(n) = n + 124 for n > 121. [Charles R Greathouse IV, Jul 17 2011]
PROG
(PARI) upto(lim)=my(v=List(), tb, tc, td, te); for(a=5, sqrt(lim), for(b=4, min(a-1, sqrt(lim-a^2)), tb=a^2+b^2; for(c=3, min(b-1, sqrt(lim-tb)), tc=tb+c^2; for(d=2, min(c-1, sqrt(lim-tc)), td=tc+d^2; for(e=1, d-1, te=td+e^2; if(te>lim, break, listput(v, te))))))); vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Jul 17 2011
(Haskell)
a004434 n = a004434_list !! (n-1)
a004434_list = filter (p 5 $ tail a000290_list) [1..] where
p k (q:qs) m = k == 0 && m == 0 ||
q <= m && k >= 0 && (p (k - 1) qs (m - q) || p k qs m)
-- Reinhard Zumkeller, Apr 22 2013
CROSSREFS
Sequence in context: A043959 A285804 A269808 * A168109 A116055 A068898
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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 May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)