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 17 results. Next

A243148 Triangle read by rows: T(n,k) = number of partitions of n into k nonzero squares; n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, May 30 2014

Keywords

Examples

			T(20,5) = 2 = #{ (16,1,1,1,1), (4,4,4,4,4) } since 20 = 4^2 + 4 * 1^2 = 5 * 2^2.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 0, 1;
  0, 1, 0, 0, 1;
  0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 0, 1, 0, 0, 1;
  0, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  (...)
		

Crossrefs

Columns k = 0..10 give: A000007, A010052 (for n>0), A025426, A025427, A025428, A025429, A025430, A025431, A025432, A025433, A025434.
Row sums give A001156.
T(2n,n) gives A111178.
T(n^2,n) gives A319435.
T(n,k) = 1 for n in A025284, A025321, A025357, A294675, A295670, A295797 (for k = 2..7, respectively).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(i^2>n, 0, b(n-i^2, i, t-1))))
        end:
    T:= (n, k)-> b(n, isqrt(n), k):
    seq(seq(T(n, k), k=0..n), n=0..14);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+(s-> `if`(s>n, 0, expand(x*b(n-s, i))))(i^2)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, isqrt(n))):
    seq(T(n), n=0..14);  # Alois P. Heinz, Oct 30 2021
  • Mathematica
    b[n_, i_, k_, t_] := b[n, i, k, t] = If[n == 0, If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i-1, k, t] + If[i^2 > n, 0, b[n-i^2, i, k, t-1]]]]; T[n_, k_] := b[n, Sqrt[n] // Floor, k, k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jun 06 2014, after Alois P. Heinz *)
    T[n_, k_] := Count[PowersRepresentations[n, k, 2], r_ /; FreeQ[r, 0]]; T[0, 0] = 1; Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2016 *)
  • PARI
    T(n,k,L=n)=if(n>k*L^2, 0, k>n-3, k==n, k<2, issquare(n,&n) && n<=L*k, k>n-6, n-k==3, L=min(L,sqrtint(n-k+1)); sum(r=0,min(n\L^2,k-1),T(n-r*L^2,k-r,L-1), n==k*L^2)) \\ M. F. Hasler, Aug 03 2020

Formula

T(n,k) = [x^n y^k] 1/Product_{j>=1} (1-y*x^A000290(j)).
Sum_{k=1..n} k * T(n,k) = A281541(n).
Sum_{k=1..n} n * T(n,k) = A276559(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A292520(n).

A287166 Smallest number with exactly n representations as a sum of 7 nonzero squares or 0 if no such number exists.

Original entry on oeis.org

7, 22, 31, 37, 45, 67, 55, 61, 69, 70, 79, 82, 94, 108, 85, 93, 103, 106, 111, 132, 109, 126, 139, 117, 147, 146, 130, 145, 144, 133, 153, 167, 141, 154, 160, 172, 159, 166, 187, 157, 177, 174, 175, 0, 178, 165
Offset: 1

Views

Author

Ilya Gutkovskiy, May 20 2017

Keywords

Examples

			a(1) = 7 because 7 is the smallest number with exactly 1 representation as a sum of 7 nonzero squares: 7 = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2;
a(2) = 22 because 22 is the smallest number with exactly 2 representations as a sum of 7 nonzero squares: 22 = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 4^2 = 1^2 + 1^2 + 2^2 + 2^2 + 2^2 + 2^2 + 2^2, etc.
		

Crossrefs

Formula

A025431(a(n)) = n for a(n) > 0.

A340906 Number of ways to write n as an ordered sum of 7 squares of positive integers.

Original entry on oeis.org

1, 0, 0, 7, 0, 0, 21, 0, 7, 35, 0, 42, 35, 0, 105, 28, 21, 140, 49, 105, 105, 106, 210, 84, 182, 210, 217, 287, 105, 420, 378, 126, 497, 392, 420, 532, 350, 630, 714, 434, 546, 980, 742, 609, 980, 896, 1071, 882, 875, 1470, 1239, 1099, 1155, 1722, 1652, 882, 1933, 1995, 1554, 2072, 1505
Offset: 7

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add((s->
          `if`(s>n, 0, b(n-s, t-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n, 7):
    seq(a(n), n=7..67);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 67; CoefficientList[Series[(EllipticTheta[3, 0, x] - 1)^7/128, {x, 0, nmax}], x] // Drop[#, 7] &

Formula

G.f.: (theta_3(x) - 1)^7 / 128, where theta_3() is the Jacobi theta function.

A340998 Number of partitions of n into 7 distinct nonzero squares.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 0, 2, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 2, 3, 0, 0, 2, 2
Offset: 140

Views

Author

Ilya Gutkovskiy, Feb 02 2021

Keywords

Crossrefs

A294690 Largest number with exactly n representations as a sum of seven nonnegative squares.

Original entry on oeis.org

3, 11, 15, 23, 24, 32, 35, 33, 39, 47, 48, 51, 56, 59, 55, 64, 62, 71, 68, 61, 80, 75, 83, 79, 78, 77, 96, 92, 95
Offset: 1

Views

Author

Robert Price, Nov 27 2017

Keywords

Comments

It appears that a(30) does not exist.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

A295795 Largest number with exactly n representations as a sum of seven positive squares.

Original entry on oeis.org

20, 44, 38, 68, 65, 60, 83, 89, 92, 81, 107, 99, 116, 110, 108, 90, 131, 128, 140, 134, 132, 125, 155, 143, 127, 164, 158, 148, 149, 144, 163, 179, 167, 151, 176, 185, 172, 188, 173, 203, 180, 177, 174, 195
Offset: 0

Views

Author

Robert Price, Nov 27 2017

Keywords

Comments

It appears that a(44) does not exist.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

A295797 Numbers that have exactly one representation as a sum of seven positive squares.

Original entry on oeis.org

7, 10, 13, 15, 16, 18, 19, 21, 23, 24, 26, 27, 29, 32, 35, 36, 41, 44
Offset: 1

Views

Author

Robert Price, Nov 27 2017

Keywords

Comments

It appears that this sequence is finite and complete. See the von Eitzen link for a proof for the 5 positive squares case.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

Programs

  • Mathematica
    m = 7;
    r[n_] := Reduce[xx = Array[x, m]; 0 <= x[1] && LessEqual @@ xx && AllTrue[xx, Positive] && n == Total[xx^2], xx, Integers];
    For[n = 0, n < 50, n++, rn = r[n]; If[rn[[0]] === And, Print[n, " ", rn]]] (* Jean-François Alcover, Feb 25 2019 *)
    b[n_, i_, k_, t_] := b[n, i, k, t] = If[n == 0, If[t == 0, 1, 0], If[i<1 || t<1, 0, b[n, i - 1, k, t] + If[i^2 > n, 0, b[n - i^2, i, k, t - 1]]]];
    T[n_, k_] := b[n, Sqrt[n] // Floor, k, k];
    Position[Table[T[n, 7], {n, 0, 100}], 1] - 1 // Flatten (* Jean-François Alcover, Nov 06 2020, after Alois P. Heinz in A243148 *)

Formula

A243148(a(n),7) = 1. - Alois P. Heinz, Feb 25 2019

A295796 The only integers that cannot be partitioned into a sum of seven positive squares.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 14, 17, 20
Offset: 1

Views

Author

Robert Price, Nov 27 2017

Keywords

References

  • Dubouis, E.; L'Interm. des math., vol. 18, (1911), pp. 55-56, 224-225.
  • Grosswald, E.; Representation of Integers as Sums of Squares, Springer-Verlag, New York Inc., (1985), pp.73-74.

Crossrefs

A295799 Numbers that have exactly two representations as a sum of seven positive squares.

Original entry on oeis.org

22, 25, 28, 30, 33, 38
Offset: 1

Views

Author

Robert Price, Nov 27 2017

Keywords

Comments

It appears that this sequence is finite and complete. See the von Eitzen link for a proof for the 5 positive squares case.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

A295800 Numbers that have exactly three representations as a sum of seven positive squares.

Original entry on oeis.org

31, 34, 39, 43, 47, 51, 56, 59, 68
Offset: 1

Views

Author

Robert Price, Nov 27 2017

Keywords

Comments

It appears that this sequence is finite and complete. See the von Eitzen link for a proof for the 5 positive squares case.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

Showing 1-10 of 17 results. Next