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-10 of 16 results. Next

A223726 Multiplicities for A004433: sum of four distinct nonzero squares.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 1, 1, 1, 3, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 5, 1, 2, 3, 1, 1, 2, 3, 1, 2, 1, 1, 2, 4, 2, 1, 2, 3, 1, 5, 2, 2, 2, 2, 3, 4, 3, 1, 4, 1, 1, 4, 2, 2, 2, 5, 3, 1, 6, 3, 3, 1, 2, 1, 1, 4, 4, 1, 2, 5, 1, 3, 7, 3, 2, 3, 4
Offset: 1

Views

Author

Wolfdieter Lang, Mar 26 2013

Keywords

Comments

The number A004433(n) can be partitioned into four distinct parts, each of which is a nonzero square, and a(n) gives the multiplicity which is the number of different partitions of this type.

Examples

			a(1) = 1 because  A004433(1) = 30 has only one representation as sum of four distinct nonzero squares, given by the quadruple [1,2,3,4]: 1^2 + 2^2 + 3^2 + 4^2 = 30.
a(16) = 3 because for A004433(3) = 78 the three different quadruples are [1, 2, 3, 8], [1, 4, 5, 6] and [2, 3, 4, 7].
a(48) = 5 because A004433(48) = 126 has five different  representations given by the five quadruples [1, 3, 4, 10], [1, 5, 6, 8], [2, 3, 7, 8], [2, 4, 5, 9], [4, 5, 6, 7].
		

Crossrefs

Formula

a(n) = k if there are k different quadruples [s(1),s(2),2(3),s(4)] with increasing positive entries with sum(s(j)^2,j=1..4) = A004433(n), n >= 1.

A003995 Sum of (any number of) distinct squares: of form r^2 + s^2 + t^2 + ... with 0 <= r < s < t < ...

Original entry on oeis.org

0, 1, 4, 5, 9, 10, 13, 14, 16, 17, 20, 21, 25, 26, 29, 30, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 97
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A001983, A033461, A008935. Complement of A001422.

Programs

  • Haskell
    a003995 n = a003995_list !! (n-1)
    a003995_list = filter (p a000290_list) [0..]
       where p (q:qs) m = m == 0 || q <= m && (p qs (m - q) || p qs m)
    -- Reinhard Zumkeller, Apr 22 2013
  • Mathematica
    lim = 10; s = {0}; Do[s = Union[s, s + n^2], {n, lim}]; Select[s, 0 <= # <= lim^2 &] (* T. D. Noe, Jul 10 2012 *)
  • PARI
    a(n)=if(n<1,0,n=a(n-1); until(polcoeff(prod(k=1,sqrt(n),1+x^k^2), n), n++); n)
    

Formula

Exponents in expansion of (1+x)*(1+x^4)*(1+x^9)*(1+x^16)*(1+x^25)*(1+x^36)*(1+x^49)*(1+x^64)*(1+x^81)*(1+x^100)*(1+x^121)*(1+x^144)*...
For n > 98, a(n) = n + 30. - Charles R Greathouse IV, Sep 02 2011 (This implies a(n+2) = 2*a(n+1)-a(n) for n > 98.)

A004432 Numbers that are the sum of 3 distinct nonzero squares.

Original entry on oeis.org

14, 21, 26, 29, 30, 35, 38, 41, 42, 45, 46, 49, 50, 53, 54, 56, 59, 61, 62, 65, 66, 69, 70, 74, 75, 77, 78, 81, 83, 84, 86, 89, 90, 91, 93, 94, 98, 101, 104, 105, 106, 107, 109, 110, 113, 114, 115, 116, 117, 118, 120, 121, 122, 125, 126, 129, 131, 133
Offset: 1

Views

Author

Keywords

Comments

Numbers that can be written as a(n) = x^2 + y^2 + z^2 with 0 < x < y < z.
This is a subsequence (equal to the range) of A024803. As a set, it is the union of A025339 and A024804, subsequences of numbers having exactly one, resp. more than one, such representations. - M. F. Hasler, Jan 25 2013
Conjecture: a number n is a sum of 3 squares, but not a sum of 3 distinct nonzero squares (i.e., is in A004432 but not A000408), if and only if it is of the form 4^j*s, where j >= 0 and s in {1, 2, 3, 5, 6, 9, 10, 11, 13, 17, 18, 19, 22, 25, 27, 33, 34, 37, 43, 51, 57, 58, 67, 73, 82, 85, 97, 99, 102, 123, 130, 163, 177, 187, 193, 267, 627, 697}. - Jeffrey Shallit, Jan 15 2017
4*a(n) gives the sums of 3 distinct nonzero even squares. - Wesley Ivan Hurt, Apr 05 2021

Examples

			14 = 1^2 + 2^2 + 3^2;
62 = 1^2 + 5^2 + 6^2.
		

Crossrefs

Programs

  • Haskell
    a004432 n = a004432_list !! (n-1)
    a004432_list = filter (p 3 $ 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
    f[upto_]:=Module[{max=Floor[Sqrt[upto]]},Select[Union[Total/@ (Subsets[ Range[ max],{3}]^2)],#<=upto&]]; f[150]  (* Harvey P. Dale, Mar 24 2011 *)
  • PARI
    is_A004432(n)=for(x=1,sqrtint(n\3),for(y=x+1,sqrtint((n-1-x^2)\2),issquare(n-x^2-y^2)&return(1)))  \\ M. F. Hasler, Feb 02 2013
    

Formula

A004432 = { x^2 + y^2 + z^2; 0 < x < y < z }.
n is in A004432 <=> A025442(n) > 0. - M. F. Hasler, Feb 03 2013

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

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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
  • 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
    

Formula

a(n) = n + 124 for n > 121. - Charles R Greathouse IV, Jul 17 2011

A224981 Numbers that are the sum of exactly 6 distinct nonzero squares.

Original entry on oeis.org

91, 104, 115, 119, 124, 130, 131, 136, 139, 143, 146, 147, 151, 152, 154, 155, 156, 159, 160, 163, 164, 166, 167, 168, 169, 170, 171, 175, 176, 178, 179, 180, 181, 182, 184, 187, 188, 190, 191, 192, 194, 195, 196, 199, 200, 201, 202, 203, 204, 206, 207, 208
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2013

Keywords

Examples

			a(1) = 1 + 4 + 9 + 16 + 25 + 36 = 91 = A000330(6);
a(2) = 1 + 4 + 9 + 16 + 25 + 49 = 104;
a(3) = 1 + 4 + 9 + 16 + 36 + 49 = 115;
a(4) = 1 + 4 + 9 + 16 + 25 + 64 = 119;
a(5) = 1 + 4 + 9 + 25 + 36 + 49 = 124.
		

Crossrefs

Programs

  • Haskell
    a224981 n = a224981_list !! (n-1)
    a224981_list = filter (p 6 $ 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)
  • Mathematica
    nmax = 1000;
    S[n_] := S[n] = Union[Total /@ Subsets[
         Range[Floor[Sqrt[n]]]^2, {6}]][[1 ;; nmax]];
    S[nmax];
    S[n = nmax + 1];
    While[S[n] != S[n - 1], n++];
    S[n] (* Jean-François Alcover, Nov 20 2021 *)

A224982 Numbers that are the sum of exactly 7 distinct nonzero squares.

Original entry on oeis.org

140, 155, 168, 172, 179, 185, 188, 191, 195, 196, 200, 203, 204, 205, 211, 212, 215, 217, 219, 220, 224, 225, 227, 230, 231, 232, 233, 235, 236, 239, 240, 243, 244, 245, 246, 247, 248, 251, 252, 254, 256, 257, 259, 260, 263, 264, 265, 267, 268, 269, 270, 271
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2013

Keywords

Examples

			a(1) = 1 + 4 + 9 + 16 + 25 + 36 + 49 = 140 = A000330(7);
a(2) = 1 + 4 + 9 + 16 + 25 + 36 + 64 = 155;
a(3) = 1 + 4 + 9 + 16 + 25 + 49 + 64 = 168;
a(4) = 1 + 4 + 9 + 16 + 25 + 36 + 81 = 172;
a(5) = 1 + 4 + 9 + 16 + 36 + 49 + 64 = 179.
		

Crossrefs

Programs

  • Haskell
    a224982 n = a224982_list !! (n-1)
    a224982_list = filter (p 7 $ 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)
  • Mathematica
    nmax = 1000;
    S[n_] := S[n] = Union[Total /@ Subsets[
         Range[Floor[Sqrt[n]]]^2, {7}]][[1 ;; nmax]];
    S[nmax];
    S[n = nmax + 1];
    While[S[n] != S[n - 1], n++];
    S[n] (* Jean-François Alcover, Nov 20 2021 *)

A224983 Numbers that are the sum of exactly 8 distinct nonzero squares.

Original entry on oeis.org

204, 221, 236, 240, 249, 255, 260, 261, 268, 269, 272, 276, 279, 281, 284, 285, 288, 289, 293, 295, 296, 299, 300, 303, 305, 306, 309, 311, 312, 316, 317, 320, 321, 323, 324, 325, 326, 327, 329, 332, 333, 335, 336, 337, 338, 339, 340, 341, 344, 345, 347, 348
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2013

Keywords

Examples

			a(1) = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 = 204 = A000330(8);
a(2) = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 81 = 221;
a(3) = 1 + 4 + 9 + 16 + 25 + 36 + 64 + 81 = 236;
a(4) = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 100 = 240;
a(5) = 1 + 4 + 9 + 16 + 25 + 49 + 64 + 81 = 249.
		

Crossrefs

Programs

  • Haskell
    a224983 n = a224983_list !! (n-1)
    a224983_list = filter (p 8 $ 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)
  • Mathematica
    nmax = 1000;
    S[n_] := S[n] = Union[Total /@ Subsets[
         Range[Floor[Sqrt[n]]]^2, {8}]][[1 ;; nmax]];
    S[nmax];
    S[n = nmax + 1];
    While[S[n] != S[n - 1], n++];
    S[n] (* Jean-François Alcover, Nov 20 2021 *)

A004441 Numbers that are not the sum of 4 distinct nonzero squares.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 47, 48, 49, 52, 53, 55, 56, 58, 59, 60, 61, 64, 67, 68
Offset: 1

Views

Author

Keywords

Comments

It has been shown that 157 is the last odd number in this sequence. Beyond 157, the terms grow exponentially. - T. D. Noe, Apr 07 2007
Taking a(86) to a(120) as initial terms, A004441(n) satisfies the 35th-order recurrence relation u(n) = 4*u(n-35). - Ant King, Aug 13 2010

Crossrefs

Cf. A004195, A004196, A004433 (complement).

Programs

  • Mathematica
    data1=Reduce[w^2+x^2+y^2+z^2==# && 00,0,k],{k,1,Length[data2]}],0] (* Ant King, Aug 13 2010 *)

A033985 Number of partitions of n into two or more distinct nonzero squares.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 0, 2, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 1, 0, 0, 2, 2, 0, 0, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 0, 2, 3, 1, 0, 4, 3, 0, 1, 2, 2, 1, 0, 1, 4, 3, 0, 2, 4, 2, 1, 2, 2, 1, 2, 3, 3, 2, 1, 3, 6, 3, 0, 2, 5, 3, 0, 1, 3, 3, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

G.f.: Product_{k>=1} (1+x^(k^2)) - Sum_{k>=1} x^(k^2). - Sean A. Irvine, Jul 26 2020

Extensions

Title improved by Sean A. Irvine, Jul 26 2020

A259058 Numbers that are representable in at least two ways as sums of four distinct nonvanishing squares.

Original entry on oeis.org

454, 530, 614, 706, 806, 914, 1030, 1154, 1286, 1426, 1574, 1730, 1894, 2066, 2246, 2434, 2630, 2834, 3046, 3266, 3494, 3730, 3974, 4226, 4486, 4754, 5030, 5314, 5606, 5906, 6214, 6530, 6854, 7186, 7526, 7874, 8230, 8594, 8966, 9346, 9734
Offset: 0

Views

Author

Wolfdieter Lang, Aug 12 2015

Keywords

Comments

This is part one of Exercise 229 in Sierpiński's problem book. See p. 20 and p. 110 for the solution. He uses the identity (n-8)^2 + (n-1)^2 + (n+1)^2 + (n+8)^2 = 4*n^2 + 130 = (n-7)^2 + (n-4)^2 + (n+4)^2 + (n+7)^2, for n >= 9.
Here n was replaced by n + 9: (n+1)^2 + (n+8)^2 +(n+10)^2 + (n+17)^2 = 4*n^2 + 72*n + 454 = (n+2)^2 + (n+5)^2 + (n+13)^2 + (n+16)^2, for n >= 0.
There may be other numbers having this property.
Because the summands have no common factor > 1 each of these two representations is called primitive. Therefore, this is a proper subsequence of A223727, hence of A004433. - Wolfdieter Lang, Aug 20 2015

Examples

			n=0: 454 = 1^2 + 8^2 + 10^2 + 17^2 = 2^2 + 5^2 + 13^2 + 16^2.
n=2: 614 = 3^2 + 10^2 + 12^2 + 19^2 = 4^2 + 7^2 + 15^2 + 18^2.
		

References

  • W. Sierpiński, 250 Problems in Elementary Number Theory, American Elsevier Publ. Comp., New York, PWN-Polish Scientific Publishers, Warszawa, 1970.

Crossrefs

Cf. A259059, A223727, A004433, A259060 (four cubes).

Programs

  • Magma
    [4*n^2 + 72*n + 454: n in [0..50]]; // Vincenzo Librandi, Aug 13 2015
    
  • Magma
    I:=[454, 530, 614]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]]; // Vincenzo Librandi, Aug 13 2015
    
  • Mathematica
    CoefficientList[Series[2 (227 - 416 x + 193 x^2)/(1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Aug 13 2015 *)
  • PARI
    a(n)=4*n^2+72*n+454 \\ Charles R Greathouse IV, Jun 17 2017

Formula

a(n) = 4*n^2 + 72*n + 454 = 2*A259059(n). See the comment for the sum of four squares in two ways.
O.g.f.: 2*(227 - 416*x + 193*x^2)/(1-x)^3.
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3). - Vincenzo Librandi, Aug 13 2015
Showing 1-10 of 16 results. Next