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-7 of 7 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

A003108 Number of partitions of n into cubes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 17, 17, 17, 18, 18, 18, 19, 19, 21, 21, 21, 22, 22, 22, 23, 23, 25, 26, 26, 27, 27, 27, 28
Offset: 0

Views

Author

Keywords

Comments

The g.f. 1/(z+1)/(z**2+1)/(z**4+1)/(z-1)**2 conjectured by Simon Plouffe in his 1992 dissertation is wrong.

Examples

			a(16) = 3 because we have [8,8], [8,1,1,1,1,1,1,1,1] and [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1].
G.f.: A(x) = 1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + 2*x^8 +...
such that the g.f. A(x) satisfies the identity [Paul D. Hanna]:
A(x) = 1/((1-x)*(1-x^8)*(1-x^27)*(1-x^64)*(1-x^125)*...)
A(x) = 1 + x/(1-x) + x^8/((1-x)*(1-x^8)) + x^27/((1-x)*(1-x^8)*(1-x^27)) + x^64/((1-x)*(1-x^8)*(1-x^27)*(1-x^64)) +...
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Jan 04 1974.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.

Crossrefs

Programs

  • Haskell
    a003108 = p $ tail a000578_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
    
  • Magma
    [#RestrictedPartitions(n,{d^3:d in [1..n]}): n in [0..150]]; // Marius A. Burtea, Jan 02 2019
    
  • Maple
    g:=1/product(1-x^(j^3),j=1..30): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=0..65); # Emeric Deutsch, Mar 30 2006
  • Mathematica
    nmax = 100; CoefficientList[Series[Product[1/(1 - x^(k^3)), {k, 1, nmax^(1/3)}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 19 2015 *)
    nmax = 60; cmax = nmax^(1/3);
    s = Table[n^3, {n, cmax}];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Jul 31 2020 *)
  • PARI
    {a(n)=polcoeff(1/prod(k=1, ceil(n^(1/3)), 1-x^(k^3)+x*O(x^n)), n)} /* Paul D. Hanna, Mar 09 2012 */
    
  • PARI
    {a(n)=polcoeff(1+sum(m=1, ceil(n^(1/3)), x^(m^3)/prod(k=1, m, 1-x^(k^3)+x*O(x^n))), n)} /* Paul D. Hanna, Mar 09 2012 */
    
  • Python
    from functools import lru_cache
    from sympy import integer_nthroot, divisors
    @lru_cache(maxsize=None)
    def A003108(n):
        @lru_cache(maxsize=None)
        def a(n): return integer_nthroot(n,3)[1]
        @lru_cache(maxsize=None)
        def c(n): return sum(d for d in divisors(n,generator=True) if a(d))
        return (c(n)+sum(c(k)*A003108(n-k) for k in range(1,n)))//n if n else 1 # Chai Wah Wu, Jul 15 2024

Formula

G.f.: 1/Product_{j>=1} (1-x^(j^3)). - Emeric Deutsch, Mar 30 2006
G.f.: Sum_{n>=0} x^(n^3) / Product_{k=1..n} (1 - x^(k^3)). - Paul D. Hanna, Mar 09 2012
a(n) ~ exp(4 * (Gamma(1/3)*Zeta(4/3))^(3/4) * n^(1/4) / 3^(3/2)) * (Gamma(1/3)*Zeta(4/3))^(3/4) / (24*Pi^2*n^(5/4)) [Hardy & Ramanujan, 1917]. - Vaclav Kotesovec, Dec 29 2016

A002760 Squares and cubes.

Original entry on oeis.org

0, 1, 4, 8, 9, 16, 25, 27, 36, 49, 64, 81, 100, 121, 125, 144, 169, 196, 216, 225, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849
Offset: 1

Views

Author

Keywords

Comments

Catalan's Conjecture states that 8 and 9 are the only pair of consecutive numbers in this sequence. The conjecture was established in 2003 by Mihilescu.
Subsequence of A022549. - Reinhard Zumkeller, Jul 17 2010

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 68.
  • Clifford A. Pickover, The Math Book, Sterling, NY, 2009; see p. 236.

Crossrefs

Cf. A131799; union of A000290 and A000578.
First differences in A075052. [From Zak Seidov, May 10 2010]

Programs

  • Magma
    [n: n in [0..1600] | IsIntegral(n^(1/3)) or IsIntegral(n^(1/2))]; // Bruno Berselli, Feb 09 2016
    
  • Mathematica
    nMax=2000;Union[Range[0,nMax^(1/2)]^2,Range[0,nMax^(1/3)]^3] (* Vladimir Joseph Stephan Orlovsky, Apr 11 2011 *)
    nxt[n_] := Min[ Floor[1 + Sqrt[n]]^2, Floor[1 + n^(1/3)]^3]; NestList[ nxt, 0, 55] (* Robert G. Wilson v, Aug 16 2014 *)
  • PARI
    isok(n) = issquare(n) || ispower(n, 3); \\ Michel Marcus, Mar 29 2016
    
  • Python
    from math import isqrt
    from sympy import integer_nthroot
    def A002760(n):
        def f(x): return n-1+x+integer_nthroot(x,6)[0]-integer_nthroot(x,3)[0]-isqrt(x)
        m, k = n-1, f(n-1)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 09 2024

Formula

Sum_{n>=2} 1/a(n) = zeta(2) + zeta(3) - zeta(6). - Amiram Eldar, Dec 19 2020

A078635 Number of partitions of n into perfect powers.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 4, 5, 5, 5, 7, 8, 8, 8, 12, 14, 15, 15, 19, 21, 22, 22, 28, 33, 35, 37, 43, 48, 50, 52, 62, 70, 75, 79, 92, 100, 105, 109, 126, 140, 148, 157, 177, 194, 202, 211, 237, 261, 276, 290, 324, 351, 370, 384, 424, 462, 489, 514, 562, 609, 640, 670, 728
Offset: 0

Views

Author

Henry Bottomley, Dec 12 2002

Keywords

Examples

			a(10)=5 since 10 can be written as 9+1, 8+1+1, 4+4+1+1, 4+1+1+1+1+1+1, or 1+1+1+1+1+1+1+1+1+1.
		

Crossrefs

Cf. A001597.
Cf. A131799.

Programs

  • Mathematica
    t = Union[Flatten[Table[n^k, {n, 1, 60}, {k, 2, 10}]]]; p[n_] := IntegerPartitions[n, All, t]; Table[p[n], {n, 0, 12}] (*shows partitions*)
    a[n_] := Length@p@n; a /@ Range[0, 80]
    (* Clark Kimberling, Mar 09 2014 *)
    With[{nn = 64}, CoefficientList[Series[Product[1/(1 - x^k), {k, Select[Range[nn], # == 1 || GCD @@ FactorInteger[#][[All, -1]] > 1 &]}], {x, 0, nn}], x]] (* Michael De Vlieger, Sep 06 2022 *)

Formula

G.f.: Product_{k=i^j, i>=1, j>=2, excluding duplicates} 1/(1 - x^k). - Ilya Gutkovskiy, Mar 21 2017

A369519 Expansion of Product_{k>=1} 1/((1 - x^(k^2))*(1 - x^(k^3))).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 16, 21, 26, 31, 38, 46, 54, 62, 74, 88, 103, 118, 137, 158, 180, 202, 230, 263, 298, 335, 378, 426, 476, 528, 589, 658, 732, 810, 900, 998, 1101, 1208, 1330, 1465, 1608, 1760, 1930, 2116, 2310, 2513, 2738, 2985, 3246, 3521, 3826, 4156
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 25 2024

Keywords

Comments

Convolution of A001156 and A003108.
a(n) is the number of pairs (Q(k), P(n-k)), 0<=k<=n, where Q(k) is a partition of k into squares and P(n-k) is a partition of n-k into cubes.

Crossrefs

Programs

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

Formula

a(n) ~ zeta(3/2) * exp(3 * Pi^(1/3) * zeta(3/2)^(2/3) * n^(1/3) / 2^(4/3) + 2^(4/9) * Gamma(1/3) * zeta(4/3) * n^(2/9) / (3 * Pi^(1/9) * zeta(3/2)^(2/9)) - 4*2^(2/9) * Gamma(1/3)^2 * zeta(4/3)^2 * n^(1/9) / (243 * Pi^(5/9) * zeta(3/2)^(10/9)) + 16*Gamma(1/3)^3 * zeta(4/3)^3 / (6561 * Pi * zeta(3/2)^2)) / (16 * sqrt(6) * Pi^(5/2) * n^(3/2)) * (1 + (13*2^(7/9) * Gamma(1/3) * zeta(4/3) / (81 * Pi^(4/9) * zeta(3/2)^(8/9)) + 832*2^(7/9) * Gamma(1/3)^4 * zeta(4/3)^4 / (1594323 * Pi^(13/9) * zeta(3/2)^(26/9))) / n^(1/9) + (692224 * 2^(5/9) * Gamma(1/3)^8 * zeta(4/3)^8 / (2541865828329 * Pi^(26/9) * zeta(3/2)^(52/9)) - 128 * 2^(5/9) * Gamma(1/3)^5 * zeta(4/3)^5 / (4782969 * Pi^(17/9) * zeta(3/2)^(34/9)) + 65*2^(5/9) * Gamma(1/3)^2 * zeta(4/3)^2 / (2187*Pi^(8/9) * zeta(3/2)^(16/9)))/n^(2/9)).

A280125 Expansion of Product_{k>=1} 1/((1 - x^(prime(k)^2))*(1 - x^(prime(k)^3))).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 0, 4, 4, 2, 2, 4, 4, 2, 2, 5, 6, 4, 4, 7, 6, 4, 4, 8, 8, 6, 7, 10, 10, 6, 7, 11, 13, 9, 10, 15, 15, 12, 10, 16, 18, 16, 14, 20, 22, 19, 17, 21, 25, 23, 22, 26, 29, 28, 25, 30, 32, 33, 31, 37, 38, 38, 37
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2016

Keywords

Comments

Number of partitions of n into parts that are squares of primes (A001248) or cubes of primes (A030078).

Examples

			a(16) = 3 because we have [8, 8], [8, 4, 4] and [4, 4, 4, 4].
		

Crossrefs

Programs

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

Formula

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

A280126 Expansion of Product_{k>=1} (1 + x^(prime(k)^2))*(1 + x^(prime(k)^3)).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Dec 26 2016

Keywords

Comments

Number of partitions of n into distinct parts that are squares of primes (A001248) or cubes of primes (A030078).

Examples

			a(61) = 2 because we have [49, 8, 4] and [25, 27, 9].
		

Crossrefs

Programs

  • Mathematica
    nmax = 120; CoefficientList[Series[Product[(1 + x^Prime[k]^2) (1 + x^Prime[k]^3), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 + x^(prime(k)^2))*(1 + x^(prime(k)^3)).
Showing 1-7 of 7 results.