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.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Examples

			30 = 1^2+2^2+3^2+4^2.
		

Crossrefs

Programs

  • Haskell
    a004433 n = a004433_list !! (n-1)
    a004433_list = filter (p 4 $ 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
    
  • Mathematica
    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 *)
    Select[Union[Total[#^2]&/@Subsets[Range[10],{4}]],#<=137&] (* Harvey P. Dale, Jul 03 2011 *)
  • 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=1)); Vec(v) \\ Charles R Greathouse IV, Jan 08 2025

Formula

{n: A025443(n) >=1}. Union of A025386 and A025376. - R. J. Mathar, Jun 15 2018
a(n) = n + O(log n). - Charles R Greathouse IV, Jan 08 2025

A001995 Numbers that are the sum of 5 distinct squares: of form v^2 + w^2 + x^2 + y^2 + z^2 with 0 <= v < w < x < y < z.

Original entry on oeis.org

30, 39, 46, 50, 51, 54, 55, 57, 62, 63, 65, 66, 70, 71, 74, 75, 78, 79, 81, 82, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 98, 99, 100, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 131
Offset: 1

Views

Author

Keywords

Examples

			30 = 0^2 + 1^1 + 2^2 + 3^2 + 4^2.
		

Crossrefs

Cf. A001944.

Programs

  • Mathematica
    nn = 15; Select[Union[Flatten[Table[a^2 + b^2 + c^2 + d^2 + e^2, {a, 0, nn}, {b, a + 1, nn}, {c, b + 1, nn}, {d, c + 1, nn}, {e, d + 1, nn}]]], # <= nn^2 &] (* T. D. Noe, Aug 17 2012 *)

A001948 These numbers when multiplied by all powers of 4 give the numbers that are not the sums of 4 distinct squares.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 15, 17, 18, 19, 22, 23, 25, 27, 31, 33, 34, 37, 43, 47, 55, 58, 67, 73, 82, 97, 103
Offset: 1

Views

Author

Keywords

Comments

See also the comment in sequence A004437: The only integers that cannot be partitioned into a sum of four distinct squares of nonnegative integers are 4^k x (A union B) where A = {1,3,5,7,9,11,13,15,17,19,23,25,27,31,33,37,43,47,55,67,73,97,103} and B = {2,6,10,18,22,34,58,82}. - M. F. Hasler, Jun 11 2014

Crossrefs

A004437 Numbers that are not the sum of 4 distinct squares.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34, 36, 37, 40, 43, 44, 47, 48, 52, 55, 58, 60, 64, 67, 68, 72, 73, 76, 80, 82, 88, 92, 96, 97, 100, 103, 108, 112
Offset: 1

Views

Author

Keywords

Comments

It follows from the formula that there are infinitely many integers that cannot be partitioned into a sum of four distinct squares of nonnegative integers and infinitely many that can. Furthermore, the largest odd number that has no such partition is 103, and thereafter the terms satisfy the thirty-first order recurrence relation a(n) = 4a(n-31). - Ant King, Nov 02 2010

Crossrefs

Cf. A001944 (complement).

Programs

  • Mathematica
    data = Reduce[ w^2 + x^2 + y^2 + z^2 == # && 0 <= w < x < y < z < #, {w, x, y, z}, Integers] & /@ Range[112]; DeleteCases[ Table[If[Head[data[[k]]] === Symbol, k, 0], {k, 1, Length[data]}], 0] (* Ant King, Nov 02 2010 *)

Formula

Let k>=0. Then the only integers that cannot be partitioned into a sum of four distinct squares of nonnegative integers are 4^k * N3, where N3 = (N1 union N2), and N1 and N2 are defined by N1 = {1,3,5,7,9,11,13,15,17,19,23,25,27,31,33,37,43,47,55,67,73,97,103} and N2 = {2,6,10,18,22,34,58,82}, respectively. - Ant King, Nov 02 2010
Showing 1-4 of 4 results.