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

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

A078135 Numbers which cannot be written as a sum of squares > 1.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 14, 15, 19, 23
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

Numbers such that A078134(n)=0.
"Numbers which cannot be written as sum of squares > 1" is equivalent to "Numbers which cannot be written as sum of squares of primes." Equivalently, numbers which can be written as the sum of nonzero squares can also be written as sum of the squares of primes." cf. A090677 = number of ways to partition n into sums of squares of primes. - Jonathan Vos Post, Sep 20 2006
The sequence is finite with a(12)=23 as last member. Proof: When k=a^2+b^2+..., k+4 = 2^2+a^2+b^2+... If k can be written as sum of the squares of primes, k+4 also has this property. As 24,25,26,27 have the property, by induction, all numbers > 23 can be written as sum of squares>1. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Apr 07 2007
Also, numbers which cannot be written as sum of squares of 2 and 3 (see A078137 for the proof). Explicit representation as sum of squares of primes, or rather of squares of 2 and 3, for numbers m>23: we have m=c*2^2+d*3^2, where c:=(floor(m/4) - 2*(m mod 4))>=0, d:=m mod 4. For that, the finiteness of the sequence is proved constructively. - Hieronymus Fischer, Nov 11 2007
Also numbers n such that every integer partition of n contains a squarefree number. For example, 21 does not belong to the sequence because there are integer partitions of 21 containing no squarefree numbers, namely: (12,9), (9,8,4), (9,4,4,4). - Gus Wiseman, Dec 14 2018

Crossrefs

Programs

  • Mathematica
    nn=100;
    ser=Product[If[SquareFreeQ[n],1,1/(1-x^n)],{n,nn}];
    Join@@Position[CoefficientList[Series[ser,{x,0,nn}],x],0]-1 (* Gus Wiseman, Dec 14 2018 *)

Formula

A090677(a(n)) = 0. - Jonathan Vos Post, Sep 20 2006 [corrected by Joerg Arndt, Dec 16 2018]
A033183(a(n)) = 0. - Reinhard Zumkeller, Nov 07 2009

A090677 Number of ways to partition n into sums of squares of primes.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 19 2003

Keywords

Comments

From Hieronymus Fischer, Nov 11 2007: (Start)
First statement of monotony: a(n+p^2)>=a(n) for all primes p. Proof: we restrict ourselves on a(n)>0 (the case a(n)=0 is trivial). Let T(i), 1<=i<=a(n), be the a(n) different sums of squares of primes representing n. Then, adding p^2 to those expressions, we get a(n) sums of squares of primes T(i)+p^2, obviously representing n+p^2, thus a(n+p^2) cannot be less than a(n).
Second statement of monotony: a(n+m)>=max(a(n),a(m)) for all m with a(m)>1. Proof: let T(i), 1<=i<=a(n), be the a(n) different sums of squares of primes representing n; let S(i), 1<=i<=a(m), be the a(m) different sums of squares of primes representing m. Then, adding these expressions, we get a(n) sums of squares of primes T(i)+S(1), representing n+m, further we get a(m) sums T(1)+S(i), also representing n+m. Thus a(n+m) cannot be less than the maximum of a(n) and a(m).
The minimum b(k):=min( n | a(j)>k for all j>n) exists for all k>=0. See A134755 for that sequence representing b(k). (End)

Examples

			a(25)=2 because 25 = 5^2 = 4*(2^2)+3^2.
a(83)=8 because 83 = 3^2+5^2+7^2 = 4*(2^2)+2*(3^2)+7^2
                   = 2*(2^2)+3*(5^2) = 6*(2^2)+3^2+2*(5^2)
                   = 2^2+6*(3^2)+5^2 = 10*(2^2)+2*(3^2)+5^2
                   = 5*(2^2)+7*(3^2) = 14*(2^2)+3*(3^2).
		

References

  • R. F. Churchouse, Representation of integers as sums of squares of primes. Caribbean J. Math. 5 (1986), no. 2, 59-65.

Crossrefs

Programs

  • Mathematica
    CoefficientList[ Series[ Product[1/(1 - x^Prime[i]^2), {i, 111}], {x, 0, 101}], x] (* Robert G. Wilson v, Sep 20 2004 *)

Formula

G.f.: 1/((1-x^4)*(1-x^9)*(1-x^25)*(1-x^49)*(1-x^121)*(1-x^169)*(1-x^289)...).
G.f.: 1 + Sum_{i>=1} x^(prime(i)^2) / Product_{j=1..i} (1 - x^(prime(j)^2)). - Ilya Gutkovskiy, May 07 2017

A078128 Number of ways to write n as sum of cubes > 1.

Original entry on oeis.org

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, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 0, 2, 1, 0, 2, 0, 0, 1, 0, 2, 1, 0, 2, 0, 0, 1, 0, 2, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

a(A078129(n))=0; a(A078130(n))=1; a(A078131(n))>0;
Conjecture (lower bound): for all k exists b(k) such that a(n)>k for n>b(k); see b(0)=A078129(83)=154 and b(1)=A078130(63)=218.

Examples

			a(160)=4: 160 = 20*2^3 = 4^3+12*2^3 = 2*4^3+4*2^3 = 5^3+3^3+2^3.
		

Crossrefs

Programs

Formula

a(n) = 1/n*Sum_{k=1..n} (b(k)-1)*a(n-k), a(0) = 1, where b(k) is sum of cube divisors of k. - Vladeta Jovovic, Nov 20 2002
From Vaclav Kotesovec, Jan 05 2017: (Start)
a(n) = A003108(n) - A003108(n-1).
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/2) / (8 * 3^(5/2) * Pi^2 * n^2).
(End)

A078137 Numbers which can be written as sum of squares>1.

Original entry on oeis.org

4, 8, 9, 12, 13, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

A078134(a(n))>0.
Numbers which can be written as a sum of squares of primes. - Hieronymus Fischer, Nov 11 2007
Equivalently, numbers which can be written as a sum of squares of 2 and 3. Proof for numbers m>=24: if m=4*(k+6), k>=0, then m=(k+6)*2^2; if m=4*(k+6)+1 than m=(k+4)*2^2+3^2; if m=4*(k+6)+2 then m=(k+2)*2^2+2*3^2; if m=4*(k+6)+3 then m=k*2^2+3*3^2. Clearly, the numbers a(n)<24 can also be written as sums of squares of 2 and 3. Explicit representation as a sum of squares of 2 and 3 for numbers m>23: m=c*2^2+d*3^2, where c:=(floor(m/4) - 2*(m mod 4))>=0 and d:=m mod 4. - Hieronymus Fischer, Nov 11 2007

Crossrefs

Programs

Formula

a(n)=n + 12 for n >= 12. - Hieronymus Fischer, Nov 11 2007

Extensions

Edited by N. J. A. Sloane, Oct 17 2009 at the suggestion of R. J. Mathar.

A112344 Number of partitions of n into perfect powers with each part > 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 4, 2, 1, 0, 4, 2, 1, 0, 6, 5, 2, 2, 6, 5, 2, 2, 10, 8, 5, 4, 13, 8, 5, 4, 17, 14, 8, 9, 20, 17, 8, 9, 26, 24, 15, 14, 34, 27, 19, 14, 40, 38, 27, 25, 48, 47, 31, 30, 58, 59, 44, 42, 75, 68, 55, 47, 91, 86, 70, 67, 110, 106, 81, 81, 130, 134, 104
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 05 2005

Keywords

Examples

			a(20) = #{16+4, 8+8+4, 8+4+4+4, 4+4+4+4+4} = 4.
		

Crossrefs

Cf. A078635 (allowing 1).

Programs

  • Maple
    N:= 200: # to get a(1) to a(N)
    Pows:= {seq(seq(k^p, p=2..floor(log[k](N))),k=2..floor(sqrt(N)))}:
    g:= proc(n,q) option remember; if n = 0 then 1 else `+`(seq(procname(n-r,r), r=select(`<=`,Pows,min(q,n)))) fi end proc:
    seq(g(n,n), n=1..N); # Robert Israel, Nov 04 2015
  • Mathematica
    M = 200; (* to get a(1) to a(M) *)
    Pows = Table[k^p, {k, 2, Floor[Sqrt[M]]}, {p, 2, Floor[Log[k, M]]}] // Flatten // Union;
    g[n_, q_] := g[n, q] = If[n == 0, 1, Plus @@ Table[g[n - r, r], {r, Select[Pows, # <= Min[q, n]&]}]];
    Table[g[n, n], {n, 1, M}] (* Jean-François Alcover, Feb 03 2018, translated from Robert Israel's Maple code *)
  • PARI
    leastp(n) = {while(!ispower(n), n--; if (n==0, return (0))); n;}
    a(n) = {pmax = leastp(n); if (! pmax, return (0)); nb = 0; forpart(p=n, nb += (#select(x->ispower(x), Vec(p)) == #p), [4, pmax]); nb;} \\ Michel Marcus, Nov 04 2015

Extensions

Name clarified by Sean A. Irvine, Jan 12 2025

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

A078136 Numbers having exactly one representation as sum of squares>1.

Original entry on oeis.org

4, 8, 9, 12, 13, 17, 18, 21, 22, 26, 27, 30, 31, 35, 39
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

A078134(a(n))=1.
The sequence is finite with a(15)=39 as last term, since numbers m>39 can be represented as sums of squares>1 (even of squares of primes and even of squares of 2, 3 and 4 and even of squares of 2, 3 and 5) in at least two ways. Proof: if m=40+4k, k>=0, then m=(k+10)*2^2=(k+1)*2^2+4*3^2; if m=41+4k, then m=(k+8)*2^2+3^2=(k+4)*2^2+5^2; if m=42+4k, then m=(k+6)*2^2+2*3^2=(k+2)*2^2+3^2+5^2; if m=43+4k, then m=(k+4)*2^2+3*3^2=k*2^2+2*3^2+5^2. - Hieronymus Fischer, Nov 11 2007

Crossrefs

A078139 Primes which cannot be written as sum of squares>1.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

From Hieronymus Fischer, Nov 11 2007: (Start)
Equivalently, prime numbers which cannot be written as sum of squares of primes (see A078137 for the proof).
Equivalently, prime numbers which cannot be written as sum of squares of 2 and 3 (see A078137 for the proof).
The sequence is finite, since numbers > 23 can be written as sums of squares >1 (see A078135).
Explicit representation as sum of squares of primes, or rather of squares of 2 and 3, for numbers m>23: we have m=c*2^2+d*3^2, where c:=(floor(m/4) - 2*(m mod 4))>=0, d:=m mod 4. For that, the finiteness of the sequence is proved. (End)

Crossrefs

A280129 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, 2, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 2, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 2, 1, 0, 1, 3, 0, 0, 1, 1, 1, 0, 0, 1, 3, 0, 0, 2, 2, 0, 1, 2, 0, 1, 1, 2, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2016

Keywords

Comments

Number of partitions of n into distinct squares > 1.

Examples

			G.f. = 1 + x^4 + x^9 + x^13 + x^16 + x^20 + 2*x^25 + 2*x^29 + x^34 + x^36 + ...
a(25) = 2 because we have [25] and [16, 9].
		

Crossrefs

Programs

  • Mathematica
    nmax = 115; CoefficientList[Series[Product[1 + x^k^2, {k, 2, nmax}], {x, 0, nmax}], x]
  • PARI
    {a(n) = if(n < 0, 0, polcoeff( prod(k=2, sqrtint(n), 1 + x^k^2 + x*O(x^n)), n))}; /* Michael Somos, Dec 26 2016 */

Formula

G.f.: Product_{k>=2} (1 + x^(k^2)).
From Vaclav Kotesovec, Dec 26 2016: (Start)
a(n) = Sum_{k=0..n} (-1)^(n-k) * A033461(k).
a(n) + a(n-1) = A033461(n).
a(n) ~ A033461(n)/2.
(End)
Showing 1-10 of 33 results. Next