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.

A001156 Number of partitions of n into squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 8, 9, 10, 10, 12, 13, 14, 14, 16, 19, 20, 21, 23, 26, 27, 28, 31, 34, 37, 38, 43, 46, 49, 50, 55, 60, 63, 66, 71, 78, 81, 84, 90, 98, 104, 107, 116, 124, 132, 135, 144, 154, 163, 169, 178, 192, 201, 209, 220, 235, 247, 256
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n such that number of parts equal to k is multiple of k for all k. - Vladeta Jovovic, Aug 01 2004
Of course p_{4*square}(n)>0. In fact p_{4*square}(32n+28)=3 times p_{4*square}(8n+7) and p_{4*square}(72n+69) is even. These seem to be the only arithmetic properties the function p_{4*square(n)} possesses. Similar results hold for partitions into positive squares, distinct squares and distinct positive squares. - Michael David Hirschhorn, May 05 2005
The Heinz numbers of these partitions are given by A324588. - Gus Wiseman, Mar 09 2019

Examples

			p_{4*square}(23)=1 because 23 = 3^2 + 3^2 + 2^2 + 1^2 and there is no other partition of 23 into squares.
G.f.: A(x) = 1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 +...
such that the g.f. A(x) satisfies the identity [_Paul D. Hanna_]:
A(x) = 1/((1-x)*(1-x^4)*(1-x^9)*(1-x^16)*(1-x^25)*...)
A(x) = 1 + x/(1-x) + x^4/((1-x)*(1-x^4)) + x^9/((1-x)*(1-x^4)*(1-x^9)) + x^16/((1-x)*(1-x^4)*(1-x^9)*(1-x^16)) + ...
From _Gus Wiseman_, Mar 09 2019: (Start)
The a(14) = 6 integer partitions into squares are:
  (941)
  (911111)
  (44411)
  (44111111)
  (41111111111)
  (11111111111111)
while the a(14) = 6 integer partitions in which the multiplicity of k is a multiple of k for all k are:
  (333221)
  (33311111)
  (22222211)
  (2222111111)
  (221111111111)
  (11111111111111)
(End)
		

References

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

Crossrefs

Cf. A000041, A000161 (partitions into 2 squares), A000290, A033461, A131799, A218494, A285218, A304046.
Cf. A078134 (first differences).
Row sums of A243148.
Euler trans. of A010052 (see also A308297).

Programs

  • Haskell
    a001156 = p (tail a000290_list) where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Oct 31 2012, Aug 14 2011
    
  • Magma
    m:=70; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&*[1/(1-x^(k^2)): k in [1..(m+2)]]) )); // G. C. Greubel, Nov 11 2018
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+ `if`(i^2>n, 0, b(n-i^2, i))))
        end:
    a:= n-> b(n, isqrt(n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 30 2014
  • Mathematica
    CoefficientList[ Series[Product[1/(1 - x^(m^2)), {m, 70}], {x, 0, 68}], x] (* Or *)
    Join[{1}, Table[Length@PowersRepresentations[n, n, 2], {n, 68}]] (* Robert G. Wilson v, Apr 12 2005, revised Sep 27 2011 *)
    f[n_] := Length@ IntegerPartitions[n, All, Range@ Sqrt@ n^2]; Array[f, 67] (* Robert G. Wilson v, Apr 14 2013 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i^2>n, 0, b[n-i^2, i]]]]; a[n_] := b[n, Sqrt[n]//Floor]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Nov 02 2015, after Alois P. Heinz *)
  • PARI
    {a(n)=polcoeff(1/prod(k=1, sqrtint(n+1), 1-x^(k^2)+x*O(x^n)), n)} \\ Paul D. Hanna, Mar 09 2012
    
  • PARI
    {a(n)=polcoeff(1+sum(m=1, sqrtint(n+1), x^(m^2)/prod(k=1, m, 1-x^(k^2)+x*O(x^n))), n)} \\ Paul D. Hanna, Mar 09 2012
    

Formula

G.f.: Product_{m>=1} 1/(1-x^(m^2)).
G.f.: Sum_{n>=0} x^(n^2) / Product_{k=1..n} (1 - x^(k^2)). - Paul D. Hanna, Mar 09 2012
a(n) = (1/n)*Sum_{k=1..n} A035316(k)*a(n-k). - Vladeta Jovovic, Nov 20 2002
a(n) = f(n,1,3) with f(x,y,z) = if xReinhard Zumkeller, Nov 08 2009
Conjecture (Jan Bohman, Carl-Erik Fröberg, Hans Riesel, 1979): a(n) ~ c * n^(-alfa) * exp(beta*n^(1/3)), where c = 1/18.79656, beta = 3.30716, alfa = 1.16022. - Vaclav Kotesovec, Aug 19 2015
From Vaclav Kotesovec, Dec 29 2016: (Start)
Correct values of these constants are:
1/c = sqrt(3) * (4*Pi)^(7/6) / Zeta(3/2)^(2/3) = 17.49638865935104978665...
alfa = 7/6 = 1.16666666666666666...
beta = 3/2 * (Pi/2)^(1/3) * Zeta(3/2)^(2/3) = 3.307411783596651987...
a(n) ~ 3^(-1/2) * (4*Pi*n)^(-7/6) * Zeta(3/2)^(2/3) * exp(2^(-4/3) * 3 * Pi^(1/3) * Zeta(3/2)^(2/3) * n^(1/3)). [Hardy & Ramanujan, 1917]
(End)

Extensions

More terms from Eric W. Weisstein
More terms from Gh. Niculescu (ghniculescu(AT)yahoo.com), Oct 08 2006

A218495 Number of partitions of n^2 into positive cubes.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 7, 10, 17, 26, 39, 58, 89, 133, 195, 289, 420, 610, 875, 1253, 1778, 2514, 3527, 4937, 6879, 9516, 13115, 18012, 24625, 33503, 45432, 61402, 82677, 110913, 148286, 197722, 262768, 348100, 459791, 605780, 795874, 1042791, 1362800, 1776777
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 31 2012

Keywords

Comments

a(n) = A003108(A000290(n)).

Examples

			n=5: number of partitions of 25 into parts of {1, 8}:
a(5) = #{8+8+8+1, 8+8+9x1, 8+17x1, 25x1} = 4;
n=6: number of partitions of 36 into parts of {1, 8, 27}:
a(6) = #{27+8+1, 27+9x1, 4x8+4x1, 3x8+12x1, 8+8+20x1, 8+28x1, 36x1} = 7;
n=7: number of partitions of 49 into parts of {1, 8, 27}:
a(7) = #{27+8+8+6x1, 27+8+14x1, 27+22x1, 6x8+1, 5x8+9x1, 4x8+17x1, 3x8+25x1, 8+8+33x1, 8+41x1, 49x1} = 10.
		

Crossrefs

Programs

  • Haskell
    a218495 = p (tail a000578_list) . (^ 2) where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    
  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
          b(n, i-1) +`if`(i^3>n, 0, b(n-i^3, i)))
        end:
    a:= n-> b(n^2, iroot(n^2, 3)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 08 2012
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, 1, b[n, i-1] + If[i^3>n, 0, b[n - i^3, i]]]; a[n_] := b[n^2, n^(2/3) // Floor]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
  • PARI
    a(n) = {my(nb=0); forpart(p=n^2, nb += (sum(k=1, #p, ispower(p[k], 3)) == #p);); nb;} \\ Michel Marcus, Jun 02 2015
    
  • PARI
    ok(p)=for(i=1,#p,if(!ispower(p[i],3),return(0)));1
    a(n)=my(s=1);for(i=8,n^2,forpart(p=i,s+=ok(p),[8,sqrtnint(i,3)^3]));s \\ Charles R Greathouse IV, Jun 02 2015

Formula

a(n) ~ exp(4 * (Gamma(1/3)*Zeta(4/3))^(3/4) * sqrt(n) / 3^(3/2)) * (Gamma(1/3)*Zeta(4/3))^(3/4) / (24*Pi^2*n^(5/2)) [after Hardy & Ramanujan, 1917]. - Vaclav Kotesovec, Apr 10 2017
a(n) = [x^(n^2)] Product_{k>=1} 1/(1 - x^(k^3)). - Ilya Gutkovskiy, Jun 05 2017

Extensions

More terms from Alois P. Heinz, Nov 08 2012

A298935 Number of partitions of n^3 into distinct squares.

Original entry on oeis.org

1, 1, 0, 0, 1, 5, 8, 40, 96, 297, 1269, 3456, 12839, 46691, 153111, 577167, 2054576, 7602937, 29000337, 110645967, 418889453, 1580667760, 6058528796, 23121913246, 89793473393, 350029321425, 1359919742613, 5340642744919, 20948242218543, 82505892314268
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2018

Keywords

Examples

			a(5) = 5 because we have [121, 4], [100, 25], [100, 16, 9], [64, 36, 25] and [64, 36, 16, 9].
		

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[1 + x^k^2, {k, 1, Floor[n^(3/2) + 1]}], {x, 0, n^3}], {n, 0, 29}]

Formula

a(n) = [x^(n^3)] Product_{k>=1} (1 + x^(k^2)).
a(n) = A033461(A000578(n)).

A298938 Number of ordered ways of writing n^3 as a sum of n squares of nonnegative integers.

Original entry on oeis.org

1, 1, 1, 4, 5, 686, 13942, 455988, 13617853, 454222894, 18323165948, 802161109047, 42149084452070, 2481730049781672, 157265294178424356, 10977302934685469078, 812821237985857557677, 64539935903231450294134, 5504599828399250884049308
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2018

Keywords

Examples

			a(4) = 5 because we have [64, 0, 0, 0], [16, 16, 16, 16], [0, 64, 0, 0], [0, 0, 64, 0] and [0, 0, 0, 64].
		

Crossrefs

Programs

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

Formula

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

A298939 Number of ordered ways of writing n^3 as a sum of n squares of positive integers.

Original entry on oeis.org

1, 1, 1, 4, 1, 286, 7582, 202028, 6473625, 226029577, 8338249868, 391526193477, 19990594900630, 1159906506684446, 74890158861242740, 5119732406649036418, 380146984328280974281, 30198665638519565614034, 2555354508318427693497565
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2018

Keywords

Examples

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

Crossrefs

Programs

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

Formula

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

A319223 Number of ordered ways of writing n^3 as a sum of n squares.

Original entry on oeis.org

1, 2, 4, 32, 24, 14112, 674368, 39801344, 2454266992, 166591027058, 12820702401872, 1156778646258336, 119773060481140800, 14004241350957965408, 1791476464655904407168, 247572699435320047056384, 36696694077934168215974368, 5825316759916541565549586176, 989291135292653632945527984868
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 13 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[EllipticTheta[3, 0, x]^n, {x, 0, n^3}], {n, 0, 18}]
    Join[{1}, Table[SquaresR[n, n^3], {n, 18}]]

Formula

a(n) = [x^(n^3)] theta_3(x)^n, where theta_3() is the Jacobi theta function.
a(n) = [x^(n^3)] (Sum_{k=-infinity..infinity} x^(k^2))^n.
Showing 1-6 of 6 results.