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.

A004434 Numbers that are the sum of 5 distinct nonzero squares.

This page as a plain text file.
%I A004434 #29 Jun 03 2025 15:55:09
%S A004434 55,66,75,79,82,87,88,90,94,95,99,100,103,106,110,111,114,115,118,120,
%T A004434 121,123,126,127,129,130,131,132,134,135,138,139,142,143,144,145,146,
%U A004434 147,148,150,151,152,154,155,156,157,158,159,160,162,163
%N A004434 Numbers that are the sum of 5 distinct nonzero squares.
%H A004434 Reinhard Zumkeller, <a href="/A004434/b004434.txt">Table of n, a(n) for n = 1..1000</a>
%H A004434 Paul T. Bateman, Adolf J. Hildebrand, and George B. Purdy, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa67/aa6745.pdf">Sums of distinct squares</a>, Acta Arithmetica 67 (1994), pp. 349-380.
%H A004434 Franz Halter-Koch, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa42/aa4212.pdf">Darstellung natürlicher Zahlen als Summe von Quadraten</a>, Acta Arithmetica 42 (1982), pp. 11-20.
%H A004434 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%H A004434 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).
%F A004434 a(n) = n + 124 for n > 121. - _Charles R Greathouse IV_, Jul 17 2011
%o A004434 (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
%o A004434 (Haskell)
%o A004434 a004434 n = a004434_list !! (n-1)
%o A004434 a004434_list = filter (p 5 $ tail a000290_list) [1..] where
%o A004434    p k (q:qs) m = k == 0 && m == 0 ||
%o A004434                   q <= m && k >= 0 && (p (k - 1) qs (m - q) || p k qs m)
%o A004434 -- _Reinhard Zumkeller_, Apr 22 2013
%Y A004434 Cf. A003995, A004431, A004432, A004433, A224981, A224982, A224983, A000290.
%K A004434 nonn,easy
%O A004434 1,1
%A A004434 _N. J. A. Sloane_