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

A337165 Number T(n,k) of compositions of n into k nonzero squares; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 4, 0, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 1, 0, 1, 0, 3, 0, 0, 6, 0, 0, 1, 0, 0, 2, 0, 6, 0, 0, 7, 0, 0, 1, 0, 0, 0, 3, 0, 10, 0, 0, 8, 0, 0, 1, 0, 0, 0, 1, 4, 0, 15, 0, 0, 9, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 03 2021

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 0, 1;
  0, 1, 0, 0, 1;
  0, 0, 2, 0, 0,  1;
  0, 0, 0, 3, 0,  0,  1;
  0, 0, 0, 0, 4,  0,  0, 1;
  0, 0, 1, 0, 0,  5,  0, 0, 1;
  0, 1, 0, 3, 0,  0,  6, 0, 0, 1;
  0, 0, 2, 0, 6,  0,  0, 7, 0, 0, 1;
  0, 0, 0, 3, 0, 10,  0, 0, 8, 0, 0, 1;
  0, 0, 0, 1, 4,  0, 15, 0, 0, 9, 0, 0, 1;
  ...
		

Crossrefs

Row sums give A006456.
T(2n,n) gives A338464.
Main diagonal gives A000012.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add((s->
         `if`(s>n, 0, expand(x*b(n-s))))(j^2), j=1..isqrt(n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
    seq(T(n), n=0..14);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[With[{s = j^2},
         If[s>n, 0, Expand[x*b[n - s]]]], {j, 1, Sqrt[n]}]];
    T[n_] := CoefficientList[b[n], x];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Feb 07 2021, after Alois P. Heinz *)

Formula

G.f. of column k: (Sum_{j>=1} x^(j^2))^k.
Sum_{k=0..n} k * T(n,k) = A281704(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A317665(n).

A331844 Number of compositions (ordered partitions) of n into distinct squares.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 2, 6, 0, 1, 2, 0, 0, 2, 6, 0, 0, 0, 3, 8, 0, 0, 8, 30, 0, 0, 0, 2, 6, 1, 2, 6, 24, 2, 8, 6, 0, 0, 8, 30, 0, 0, 7, 32, 24, 2, 8, 30, 120, 6, 24, 2, 6, 0, 8, 36, 24, 1, 34, 150, 0, 2, 12, 30, 24, 0, 2, 38, 150, 0, 12, 78, 144, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(i*(i+1)*(2*i+1)/6n, 0, b(n-i^2, i-1, p+1))+b(n, i-1, p)))
        end:
    a:= n-> b(n, isqrt(n), 0):
    seq(a(n), n=0..82);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i+1)(2i+1)/6 < n, 0, If[n == 0, p!, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n, Sqrt[n] // Floor, 0];
    a /@ Range[0, 82] (* Jean-François Alcover, Oct 29 2020, after Alois P. Heinz *)

A224366 Number of compositions of n^2 into sums of squares.

Original entry on oeis.org

1, 1, 2, 11, 124, 2870, 133462, 12477207, 2344649612, 885591183971, 672331353833716, 1025954712063362545, 3146790000180780110540, 19400015532276248131470280, 240398159948843792847457589388, 5987629866666297470033540284817068, 299759874416459708067727376075503706332
Offset: 0

Views

Author

Paul D. Hanna, Apr 05 2013

Keywords

Comments

Equals the row sums of triangle A232266.

Examples

			Illustrate a(n) = Sum_{k=1..n} A006456(n^2-k^2):
a(1) = 1 = 1;
a(2) = 2 = 1 + 1;
a(3) = 11 = 7 + 3 + 1;
a(4) = 124 = 88 + 30 + 5 + 1;
a(5) = 2870 = 2024 + 710 + 124 + 11 + 1;
a(6) = 133462 = 94137 + 33033 + 5767 + 502 + 22 + 1;
a(7) = 12477207 = 8800750 + 3088365 + 539192 + 46832 + 2024 + 43 + 1; ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local i; if n=0 then 1
          else 0; for i while i^2<=n do %+b(n-i^2) od fi
        end:
    a:= n-> b(n^2):
    seq(a(n), n=0..17);  # Alois P. Heinz, Aug 12 2017
  • Mathematica
    b[0] = 1; b[n_] := b[n] = Sum[b[n-k], {k, Select[Range[n], IntegerQ[ Sqrt[#]]&]}];
    a[n_] := b[n^2];
    Table[a[n], {n, 0, 16}] (* Jean-François Alcover, Jun 09 2018 *)
  • PARI
    {a(n)=polcoeff(1/(1-sum(k=1,n,x^(k^2))+x*O(x^(n^2))),n^2)}
    for(n=0,21,print1(a(n),", "))
    
  • PARI
    {A006456(n)=polcoeff(1/(1-sum(k=1,sqrtint(n+1),x^(k^2))+x*O(x^n)),n)}
    {a(n)=if(n==0,1,sum(k=1,n,A006456(n^2-k^2)))}
    for(n=0,21,print1(a(n),", "))

Formula

a(n) = [x^(n^2)] 1/(1 - Sum_{k>=1} x^(k^2)).
a(n) = A006456(n^2).
a(n) = Sum_{k=1..n} A006456(n^2-k^2) for n>=1 with a(0)=1.

A317665 Expansion of 1/Sum_{k>=0} x^(k^2).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, -2, 3, -3, 1, 2, -6, 10, -11, 8, 0, -14, 29, -39, 38, -18, -22, 74, -123, 144, -110, 6, 161, -352, 491, -484, 251, 235, -896, 1528, -1825, 1452, -191, -1892, 4317, -6164, 6243, -3488, -2482, 10788, -18957, 23140, -19085, 3858, 22025, -52833, 77224, -80198, 47899
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 08 2018

Keywords

Comments

Convolution inverse of A010052.

Examples

			G.f. = 1 - x + x^2 - x^3 + x^5 - 2*x^6 + 3*x^7 - 3*x^8 + x^9 + 2*x^10 - 6*x^11 + ...
		

Crossrefs

Programs

  • Maple
    a:=series(1/add(x^(k^2),k=0..100),x=0,54): seq(coeff(a,x,n),n=0..53); # Paolo P. Lava, Apr 02 2019
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1,
          -add(`if`(issqr(n-j), a(j), 0), j=0..n-1))
        end:
    seq(a(n), n=0..53);  # Alois P. Heinz, Jul 26 2025
  • Mathematica
    nmax = 53; CoefficientList[Series[1/Sum[x^k^2, {k, 0, nmax}], {x, 0, nmax}], x]
    nmax = 53; CoefficientList[Series[2/(1 + QPochhammer[x^2]^5/(QPochhammer[x] QPochhammer[x^4])^2), {x, 0, nmax}], x]
    nmax = 53; CoefficientList[Series[2/(1 + EllipticTheta[3, 0, q]), {q, 0, nmax}], q]
    a[0] = 1; a[n_] := a[n] = -Sum[Boole[IntegerQ[Sqrt[k]]] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 53}]
  • PARI
    seq(n)=Vec(1/(sum(k=0, sqrtint(n), x^(k^2)) + O(x*x^n))) \\ Andrew Howroyd, Aug 08 2018
    
  • PARI
    a(n) = if(n==0, 1, -sum(k=1, n, issquare(k)*a(n-k))); \\ Seiichi Manyama, Mar 19 2022

Formula

G.f.: 2/(1 + theta_3(q)), where theta_3() is the Jacobi theta function.
a(n) = Sum_{k=0..n} (-1)^k * A337165(n,k).
a(0) = 1; a(n) = -Sum_{k=1..n} A010052(k) * a(n-k). - Seiichi Manyama, Mar 19 2022

A280542 Expansion of 1/(1 - Sum_{k>=2} x^(k^2)).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 2, 3, 1, 0, 3, 4, 3, 0, 4, 8, 6, 1, 5, 14, 10, 4, 7, 22, 20, 10, 12, 32, 39, 20, 21, 49, 70, 42, 37, 79, 116, 88, 65, 129, 193, 174, 122, 207, 326, 320, 238, 333, 551, 575, 463, 555, 914, 1029, 874, 959, 1502, 1829, 1621, 1691, 2486, 3192, 2989, 3000, 4172, 5488
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 05 2017

Keywords

Comments

Number of compositions (ordered partitions) of n into squares > 1.

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 75; CoefficientList[Series[1/(1 - Sum[x^k^2, {k, 2, nmax}]), {x, 0, nmax}], x]

Formula

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

A322798 Number of compositions (ordered partitions) of n into hexagonal numbers (A000384).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 9, 12, 16, 22, 29, 37, 47, 60, 77, 101, 133, 174, 226, 292, 376, 486, 632, 823, 1072, 1394, 1808, 2342, 3036, 3939, 5116, 6648, 8636, 11211, 14548, 18875, 24493, 31795, 41283, 53604, 69594, 90338, 117251, 152184, 197540
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`(t*(2*t-1)>n, t-1, t))(1+h(n-1)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i*(2*i-1)), i=1..h(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    nmax = 50; CoefficientList[Series[1/(1 - Sum[x^(k (2 k - 1)), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(2*k-1))).

A322799 Number of compositions (ordered partitions) of n into heptagonal numbers (A000566).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 17, 22, 29, 37, 46, 57, 71, 89, 112, 143, 183, 233, 295, 372, 468, 588, 741, 937, 1188, 1506, 1908, 2414, 3049, 3848, 4857, 6136, 7757, 9812, 12414, 15702, 19852, 25089, 31703, 40061, 50631, 64004, 80923, 102318
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`(t*(5*t-3)/2>n, t-1, t))(1+h(n-1)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i*(5*i-3)/2), i=1..h(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    nmax = 53; CoefficientList[Series[1/(1 - Sum[x^(k (5 k - 3)/2), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(5*k-3)/2)).

A347805 Expansion of (theta_3(x) - 1)^2 / (2 * (3 - theta_3(x))).

Original entry on oeis.org

1, 1, 1, 3, 4, 5, 7, 10, 16, 22, 30, 43, 62, 88, 123, 175, 249, 354, 502, 710, 1006, 1427, 2024, 2869, 4068, 5767, 8176, 11593, 16436, 23301, 33033, 46832, 66398, 94137, 133461, 189211, 268252, 380315, 539192, 764433, 1083764, 1536498, 2178364, 3088365, 4378502, 6207581, 8800750
Offset: 2

Views

Author

Ilya Gutkovskiy, Sep 14 2021

Keywords

Comments

Number of compositions (ordered partitions) of n into two or more squares.

Crossrefs

Programs

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

Formula

From Alois P. Heinz, Sep 14 2021: (Start)
a(n) = A006456(n) - A010052(n).
a(n) = Sum_{k=2..n} A337165(n,k). (End)

A322340 Number of compositions (ordered partitions) of n into square pyramidal numbers (A000330).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 8, 11, 15, 20, 27, 36, 48, 64, 85, 114, 153, 205, 274, 365, 487, 651, 871, 1165, 1557, 2080, 2780, 3716, 4967, 6639, 8873, 11860, 15853, 21189, 28320, 37850, 50589, 67618, 90379, 120799, 161456, 215797, 288430, 385512, 515269, 688699
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`(t*(t+1)*(2*t+1)/6>n, t-1, t))(1+h(n-1)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i*(i+1)*(2*i+1)/6), i=1..h(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    nmax = 49; CoefficientList[Series[1/(1 - Sum[x^(k (k + 1) (2 k + 1)/6), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(k+1)*(2*k+1)/6)).

A280863 Expansion of 1/(1 - Sum_{k>=0} x^((2*k+1)^2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 19, 24, 30, 37, 45, 55, 66, 79, 95, 115, 140, 171, 209, 255, 312, 381, 464, 564, 685, 832, 1011, 1229, 1494, 1818, 2214, 2697, 3285, 4000, 4869, 5926, 7211, 8772, 10670, 12980, 15793, 19219, 23391, 28470, 34653, 42179, 51336, 62475, 76025, 92510
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 09 2017

Keywords

Comments

Number of compositions (ordered partitions) of n into odd squares (A016754).

Examples

			a(12) = 5 because we have [9, 1, 1, 1], [1, 9, 1, 1], [1, 1, 9, 1], [1, 1, 1, 9] and [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].
		

Crossrefs

Programs

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

Formula

G.f.: 1/(1 - Sum_{k>=0} x^((2*k+1)^2)).
Showing 1-10 of 56 results. Next