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-6 of 6 results.

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).

A339364 Number of partitions of n into an even number of squares.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 2, 1, 3, 1, 3, 3, 3, 3, 4, 4, 6, 4, 7, 6, 7, 7, 8, 9, 11, 9, 13, 12, 14, 14, 16, 16, 20, 17, 23, 22, 25, 25, 28, 29, 33, 31, 37, 38, 41, 42, 45, 48, 54, 51, 61, 60, 67, 67, 72, 76, 84, 81, 93, 93, 102, 104, 110, 117, 125, 125, 139, 140, 153
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 01 2020

Keywords

Examples

			a(10) = 3 because we have [9, 1], [4, 4, 1, 1] and [1, 1, 1, 1, 1, 1, 1, 1, 1, 1].
		

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[(1/2) (Product[1/(1 - x^(k^2)), {k, 1, Floor[nmax^(1/2)] + 1}] + Product[1/(1 + x^(k^2)), {k, 1, Floor[nmax^(1/2)] + 1}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (Product_{k>=1} 1 / (1 - x^(k^2)) + Product_{k>=1} 1 / (1 + x^(k^2))).
a(n) = (A001156(n) + A292520(n)) / 2.

A339365 Number of partitions of n into an odd number of squares.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 1, 1, 1, 3, 1, 3, 2, 3, 3, 3, 4, 5, 4, 6, 5, 7, 7, 7, 8, 10, 9, 12, 10, 14, 13, 14, 15, 18, 17, 21, 20, 24, 24, 25, 27, 31, 30, 35, 34, 40, 40, 42, 45, 50, 50, 56, 55, 64, 65, 68, 72, 78, 79, 88, 85, 99, 99, 105, 110, 118, 122, 131, 132, 146, 149
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 01 2020

Keywords

Examples

			a(9) = 3 because we have [9], [4, 4, 1] and [1, 1, 1, 1, 1, 1, 1, 1, 1].
		

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[(1/2) (Product[1/(1 - x^(k^2)), {k, 1, Floor[nmax^(1/2)] + 1}] - Product[1/(1 + x^(k^2)), {k, 1, Floor[nmax^(1/2)] + 1}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (Product_{k>=1} 1 / (1 - x^(k^2)) - Product_{k>=1} 1 / (1 + x^(k^2))).
a(n) = (A001156(n) - A292520(n)) / 2.

A292560 Expansion of Product_{k>=1} 1/(1 + x^(k^3)).

Original entry on oeis.org

1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 0, -1, 1, -1, 1, -1, 2, -2, 2, -1, 1, -1, 1, -1, 0, 0, 0, -1, 1, -1, 1, -1, 2, -2, 2, -1, 1, -1, 2, -2, 1, -1, 1, -2, 2, -2, 1, -1, 1, -1, 1, 0, 0, 0, 1, -1, 1, -1, 1, -2, 2, -2, 1, -1, 1, -2, 2, -1, 1, -1, 2, -2, 2, -1, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 19 2017

Keywords

Comments

Convolution inverse of A279329.
The difference between the number of partitions of n into an even number of cubes and the number of partitions of n into an odd number of cubes.
In general, if m > 0 and g.f. = Product_{k>=1} 1/(1 + x^(k^m)), then a(n) ~ (-1)^n * exp((m+1) * (Gamma(1/m) * Zeta(1 + 1/m) / m^2)^(m/(m+1)) * n^(1/(m+1)) / 2) * (Gamma(1/m) * Zeta(1 + 1/m))^(m/(2*(m+1))) / (sqrt(Pi*(m+1)) * 2^((m+1)/2) * m^((m-1)/(2*(m+1))) * n^((2*m+1)/(2*(m+1)))). - Vaclav Kotesovec, Sep 19 2017

Crossrefs

Cf. A081362 (m=1), A292520 (m=2).

Programs

  • Mathematica
    nmax = 100; CoefficientList[Series[Product[1/(1 + x^(k^3)), {k, 1, Floor[nmax^(1/3)] + 1}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} 1/(1 + x^(k^3)).
a(n) ~ (-1)^n * exp(2 * (Gamma(1/3) * Zeta(4/3))^(3/4) * n^(1/4) / 3^(3/2)) * (Gamma(1/3) * Zeta(4/3))^(3/8) / (8 * 3^(1/4) * sqrt(Pi) * n^(7/8)). - Vaclav Kotesovec, Sep 19 2017

A298600 Expansion of Product_{k>=2} 1/(1 + x^(k^2)).

Original entry on oeis.org

1, 0, 0, 0, -1, 0, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 0, -1, 1, 0, 0, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, -2, 2, -1, 1, 2, -2, 1, -1, -2, 3, -2, 1, 2, -3, 2, -1, -1, 2, -3, 1, 1, -2, 3, 0, 0, 2, -3, 1, -1, -2, 3, -1, -2, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 22 2018

Keywords

Comments

The difference between the number of partitions of n into an even number of squares > 1 and the number of partitions of n into an odd number of squares > 1.

Crossrefs

Programs

  • Mathematica
    nmax = 82; CoefficientList[Series[Product[1/(1 + x^k^2), {k, 2, Floor[Sqrt[nmax]] + 1}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=2} 1/(1 + x^(k^2)).

A298601 Expansion of Product_{k>=2} (1 - x^(k^2)).

Original entry on oeis.org

1, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, -2, -1, 0, 1, 1, 1, 0, -1, 0, 1, 0, 0, 0, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 0, 1, 1, 0, 0, -2, 0, 0, 1, 0, 0, -1, -1, 2, 1, 1, 0, -1, -1
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 22 2018

Keywords

Comments

The difference between the number of partitions of n into an even number of distinct squares > 1 and the number of partitions of n into an odd number of distinct squares > 1.
Partial sums of A276516.

Crossrefs

Programs

  • Mathematica
    nmax = 92; CoefficientList[Series[Product[1 - x^k^2, {k, 2, Floor[Sqrt[nmax]] + 1}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=2} (1 - x^(k^2)).
Showing 1-6 of 6 results.