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.

A004433 Numbers that are the sum of 4 distinct nonzero squares: of form w^2+x^2+y^2+z^2 with 0

This page as a plain text file.
%I A004433 #34 Jan 08 2025 10:16:18
%S A004433 30,39,46,50,51,54,57,62,63,65,66,70,71,74,75,78,79,81,84,85,86,87,90,
%T A004433 91,93,94,95,98,99,102,105,106,107,109,110,111,113,114,116,117,118,
%U A004433 119,120,121,122,123,125,126,127,129,130,131,133,134,135,137
%N A004433 Numbers that are the sum of 4 distinct nonzero squares: of form w^2+x^2+y^2+z^2 with 0<w<x<y<z.
%H A004433 T. D. Noe, <a href="/A004433/b004433.txt">Table of n, a(n) for n = 1..1000</a>
%H A004433 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A004433 {n: A025443(n) >=1}. Union of A025386 and A025376. - _R. J. Mathar_, Jun 15 2018
%F A004433 a(n) = n + O(log n). - _Charles R Greathouse IV_, Jan 08 2025
%e A004433 30 = 1^2+2^2+3^2+4^2.
%t A004433 data = Flatten[ DeleteCases[ FindInstance[ w^2 + x^2 + y^2 + z^2 == # && 0 < w < x < y < z < #, {w, x, y, z}, Integers] & /@ Range[137], {}], 1]; w^2 + x^2 + y^2 + z^2 /. data (* _Ant King_, Oct 17 2010 *)
%t A004433 Select[Union[Total[#^2]&/@Subsets[Range[10],{4}]],#<=137&] (* _Harvey P. Dale_, Jul 03 2011 *)
%o A004433 (Haskell)
%o A004433 a004433 n = a004433_list !! (n-1)
%o A004433 a004433_list = filter (p 4 $ tail a000290_list) [1..] where
%o A004433    p k (q:qs) m = k == 0 && m == 0 ||
%o A004433                   q <= m && k >= 0 && (p (k - 1) qs (m - q) || p k qs m)
%o A004433 -- _Reinhard Zumkeller_, Apr 22 2013
%o A004433 (PARI) list(lim)=my(v=List([30, 39, 46, 50, 51, 54, 57, 62, 63, 65, 66, 70, 71, 74, 75, 78, 79, 81, 84, 85, 86, 87, 90, 91, 93, 94, 95, 98, 99, 102, 105, 106, 107, 109, 110, 111, 113, 114, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 145, 146, 147, 149, 150, 151, 153, 154, 155, 156]), u=[160, 168, 172, 176, 188, 192, 208, 220, 224, 232, 240, 256, 268, 272, 288, 292, 304, 320, 328, 352, 368, 384, 388, 400, 412, 416, 432, 448, 496, 512, 528, 544, 576, 592, 608], t=1); if(lim<156, return(select(k->k<=lim, Vec(v)))); for(n=158,lim\1, if(n<u[t], listput(v,n); next); u[t]*=4; if(t++>#u, t=1)); Vec(v) \\ _Charles R Greathouse IV_, Jan 08 2025
%Y A004433 Cf. A001944, A001995, A003995, A004431, A004432, A004434, A224981, A224982, A224983, A000290.
%K A004433 nonn,easy,nice
%O A004433 1,1
%A A004433 _N. J. A. Sloane_