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

A006456 Number of compositions (ordered partitions) of n into squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 5, 7, 11, 16, 22, 30, 43, 62, 88, 124, 175, 249, 354, 502, 710, 1006, 1427, 2024, 2870, 4068, 5767, 8176, 11593, 16436, 23301, 33033, 46832, 66398, 94137, 133462, 189211, 268252, 380315, 539192, 764433, 1083764, 1536498, 2178364
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A280542.
Row sums of A337165.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<0, 0,
          `if`(n=0, 1, add(a(n-j^2), j=1..isqrt(n))))
        end:
    seq(a(n), n=0..44);  # Alois P. Heinz, Jul 26 2025
  • Mathematica
    a[n_]:=a[n]=If[n==0, 1, Sum[a[n - k], {k, Select[Range[n], IntegerQ[Sqrt[#]] &]}]]; Table[a[n], {n,0,  100}] (* Indranil Ghosh, Jul 28 2017, after David W. Wilson's formula *)
  • PARI
    N=66;  x='x+O('x^N);
    Vec( 1/( 1 - sum(k=1,1+sqrtint(N), x^(k^2) ) ) )
    /* Joerg Arndt, Sep 30 2012 */
    
  • Python
    from gmpy2 import is_square
    class Memoize:
        def _init_(self, func):
            self.func=func
            self.cache={}
        def _call_(self, arg):
            if arg not in self.cache:
                self.cache[arg] = self.func(arg)
            return self.cache[arg]
    @Memoize
    def a(n): return 1 if n==0 else sum([a(n - k) for k in range(1, n + 1) if is_square(k)])
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 28 2017, after David W. Wilson's formula

Formula

a(0) = 1; a(n) = Sum_{1 <= k^2 <= n} a(n-k^2), if n > 0. - David W. Wilson
G.f.: 1/(1-x-x^4-x^9-....) - Jon Perry, Jul 04 2004
a(n) ~ c * d^n, where d is the root of the equation EllipticTheta(3, 0, 1/d) = 3, d = 1.41774254618138831428829091099000662953179532057717725688..., c = 0.46542113389379672452973940263069782869244877335179331541... - Vaclav Kotesovec, May 01 2014, updated Jan 05 2017
G.f.: 2/(3 - theta_3(q)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 08 2018

Extensions

Name corrected by Bob Selcoe, Feb 12 2014

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

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

Original entry on oeis.org

1, 0, 1, 1, 2, 8, 12, 129, 874, 9630, 167001, 3043147, 72844510, 2423789655, 106665874384, 6156805673648, 470151743582651, 47558937432498729, 6363358599941131580, 1126147544855148769425, 263646401550138303553708, 81649922556593759124887197
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 24 2018

Keywords

Examples

			a(5) = 8 because we have [25], [16, 9], [9, 16], [9, 4, 4, 4, 4], [4, 9, 4, 4, 4], [4, 4, 9, 4, 4], [4, 4, 4, 9, 4] and [4, 4, 4, 4, 9].
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j^2), j=2..isqrt(n)))
        end:
    a:= n-> b(n^2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 05 2018
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n - j^2], {j, 2, Floor @ Sqrt[n]}]];
    a[n_] := b[n^2];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 21 2018, after Alois P. Heinz *)

Formula

a(n) = [x^(n^2)] 1/(1 - Sum_{k>=2} x^(k^2)).
a(n) = A280542(A000290(n)).

A281155 Expansion of (Sum_{k>=2} x^(k^2))^3.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 3, 0, 0, 1, 0, 6, 0, 0, 0, 3, 3, 0, 3, 0, 6, 0, 0, 3, 0, 3, 3, 6, 0, 0, 1, 6, 6, 0, 0, 0, 6, 0, 6, 6, 0, 3, 0, 6, 6, 0, 0, 6, 3, 3, 3, 6, 6, 0, 3, 0, 6, 1, 3, 12, 6, 0, 0, 6, 3, 6, 6, 0, 3, 0, 3, 15, 6, 0, 0, 6, 12, 0, 3, 3, 6, 6, 0, 12, 3, 0, 6, 6
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 16 2017

Keywords

Comments

Number of ways to write n as an ordered sum of 3 squares > 1.

Examples

			G.f. = x^12 + 3*x^17 + 3*x^22 + 3*x^24 + x^27 + 6*x^29 + 3*x^33 + 3*x^34 + 3*x^36 + ...
a(17) = 3 because we have [9, 4, 4], [4, 9, 4] and [4, 4, 9].
		

Crossrefs

Programs

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

Formula

G.f.: (Sum_{k>=2} x^(k^2))^3.
G.f.: (1/8)*(-1 - 2*x + theta_3(0,x))^3, where theta_3 is the 3rd Jacobi theta function.

A281154 Expansion of (Sum_{k>=2} x^(k^2))^2.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 2, 0, 0, 0, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 16 2017

Keywords

Comments

Number of ways to write n as an ordered sum of 2 squares > 1.

Examples

			G.f. = x^8 + 2*x^13 + x^18 + 2*x^20 + 2*x^25 + 2*x^29 + x^32 + 2*x^34 + 2*x^40 + ...
a(13) = 2 because we have [9, 4] and [4, 9].
		

Crossrefs

Programs

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

Formula

G.f.: (Sum_{k>=2} x^(k^2))^2.
G.f.: (1/4)*(1 + 2*x - theta_3(0,x))^2, where theta_3 is the 3rd Jacobi theta function.

A303908 Expansion of 1/(2 + x - theta_2(sqrt(x))/(2*x^(1/8))), where theta_2() is the Jacobi theta function.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 2, 0, 0, 3, 1, 0, 5, 2, 0, 9, 5, 0, 15, 10, 1, 27, 20, 3, 46, 40, 9, 80, 78, 22, 139, 152, 51, 242, 290, 114, 427, 550, 247, 753, 1034, 525, 1340, 1933, 1092, 2396, 3602, 2237, 4312, 6685, 4519, 7813, 12380, 9027, 14239, 22877, 17866, 26110, 42214, 35072, 48123, 77829, 68379
Offset: 0

Views

Author

Ilya Gutkovskiy, May 02 2018

Keywords

Comments

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

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<0, 0, `if`(n=0, 1,
          add(a(n-j*(j+1)/2), j=2..isqrt(2*n))))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, May 02 2018
  • Mathematica
    nmax = 62; CoefficientList[Series[1/(2 + x - EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8))), {x, 0, nmax}], x]
    nmax = 62; CoefficientList[Series[1/(1 - Sum[x^(k (k + 1)/2), {k, 2, nmax}]), {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[SquaresR[1, 8 k + 1] a[n - k], {k, 2, n}]/2; Table[a[n], {n, 0, 62}]

Formula

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

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

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 0, 2, 0, 1, 0, 6, 0, 2, 2, 0, 0, 0, 8, 0, 0, 0, 7, 6, 0, 2, 2, 24, 0, 6, 0, 2, 0, 0, 8, 6, 0, 1, 32, 0, 0, 2, 6, 6, 0, 0, 2, 32, 0, 0, 12, 30, 0, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(25) = 3 because we have [25], [16, 9] and [9, 16].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`(i*(i+1)*(2*i+1)/6-1n, 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..87);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i(i+1)(2i+1)/6 - 1 < n, 0, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n, Floor@Sqrt[n], 0];
    a /@ Range[0, 87] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

A363738 Number of ordered partitions of n into cubes > 1.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 1, 0, 1, 0, 0, 5, 0, 0, 3, 0, 2, 0, 0, 6, 0, 0, 6, 0, 3, 0, 0, 7, 0, 0, 10, 0, 4, 1, 0, 8, 0, 0, 15, 0, 5, 4, 0, 11, 0, 0, 21, 0, 6, 10, 0, 16, 0, 0, 28, 0, 7, 20, 0, 23
Offset: 0

Views

Author

Seiichi Manyama, Jun 18 2023

Keywords

Comments

This sequence is different from A278929.

Examples

			a(43) = 3 because we have [27, 8, 8], [8, 27, 8] and [8, 8, 27].
		

Crossrefs

Programs

  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=sum(j=2, i, ispower(j, 3)*v[i-j+1])); v;

Formula

G.f.: 1/(1 - Sum_{k>=2} x^(k^3)).
a(0) = 1; a(n) = Sum_{k=2..n} A010057(k) * a(n-k).

A294071 Number of ordered ways of writing n^2 as a sum of n squares > 1.

Original entry on oeis.org

1, 0, 0, 0, 1, 5, 6, 7, 288, 262, 13702, 69531, 610567, 5356091, 51724960, 521956086, 5467658641, 59931636545, 690518644584, 8100858045744, 99142980567486, 1246972499954475, 16142015005905558, 215722810653380845, 2955759897694815985, 41614888439136252691
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 07 2018

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[((-1 - 2 x + EllipticTheta[3, 0, x])/2)^n, {x, 0, n^2}], {n, 0, 25}]

Formula

a(n) = [x^(n^2)] (Sum_{k>=2} x^(k^2))^n.

A304633 Expansion of 2/((1 - x)*(3 + 2*x - theta_3(x))), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 7, 7, 7, 9, 12, 13, 13, 16, 20, 23, 23, 27, 35, 41, 42, 47, 61, 71, 75, 82, 104, 124, 134, 146, 178, 217, 237, 258, 307, 377, 419, 456, 535, 651, 739, 804, 933, 1126, 1300, 1422, 1629, 1955, 2275, 2513, 2846, 3397, 3972, 4435, 4990, 5904
Offset: 0

Views

Author

Ilya Gutkovskiy, May 15 2018

Keywords

Comments

Partial sums of A280542.

Crossrefs

Programs

  • Mathematica
    nmax = 62; CoefficientList[Series[2/((1 - x) (3 + 2 x - EllipticTheta[3, 0, x])), {x, 0, nmax}], x]
    nmax = 62; CoefficientList[Series[1/((1 - x) (1 - Sum[x^k^2, {k, 2, nmax}])), {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[Boole[IntegerQ[k^(1/2)] && k != 1] a[n - k], {k, 1, n}]; Accumulate[Table[a[n], {n, 0, 62}]]

Formula

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