[go: up one dir, main page]

login
Search: a078135 -id:a078135
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of partitions of n into squares.
(Formerly M0221 N0079)
+10
111
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,5
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
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).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
J. Bohman et al., Partitions in squares, Nordisk Tidskr. Informationsbehandling (BIT) 19 (1979), 297-301.
J. Bohman et al., Partitions in squares, Nordisk Tidskr. Informationsbehandling (BIT) 19 (1979), 297-301. (Annotated scanned copy)
G. H. Hardy and S. Ramanujan, Asymptotic formulae in combinatory analysis, Proceedings of the London Mathematical Society, 2, XVI, 1917, p. 373.
M. D. Hirschhorn and J. A. Sellers, On a problem of Lehmer on partitions into squares, The Ramanujan Journal 8 (2004), 279-287.
F. Iacobescu, Smarandache Partition Type and Other Sequences, Bull. Pure Appl. Sci. 16E, 237-240, 1997.
Igor Pak, Complexity problems in enumerative combinatorics, arXiv:1803.06636 [math.CO], 2018.
James A. Sellers, Partitions Excluding Specific Polygonal Numbers As Parts, Journal of Integer Sequences, Vol. 7 (2004), Article 04.2.4.
F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.
Florentin Smarandache, Sequences of Numbers Involved in Unsolved Problems, arXiv:math/0604019 [math.GM], 2006.
Eric Weisstein's World of Mathematics, Partition
Eric Weisstein's World of Mathematics, Smarandache Sequences
Eric Weisstein's World of Mathematics, Square Number
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 x<y then 0^x else f(x-y,y,z)+f(x,y+z,z+2). - Reinhard 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)
EXAMPLE
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)
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 *)
PROG
(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
(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
(Magma) m:=70; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&*[1/(1-x^(k^2)): k in [1..(m+2)]]) )); // G. C. Greubel, Nov 11 2018
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
More terms from Eric W. Weisstein
More terms from Gh. Niculescu (ghniculescu(AT)yahoo.com), Oct 08 2006
STATUS
approved
Number of partitions of n into distinct squares.
+10
108
1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 0, 2, 2, 0, 0, 2, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 0, 2, 3, 1, 1, 4, 3, 0, 1, 2, 2, 1, 0, 1, 4, 3, 0, 2, 4, 2, 1, 3, 2, 1, 2, 3, 3, 2, 1, 3, 6, 3, 0, 2, 5, 3, 0, 1, 3, 3, 3, 4
OFFSET
0,26
COMMENTS
"WEIGH" transform of squares A000290.
a(n) = 0 for n in {A001422}, a(n) > 0 for n in {A003995}. - Alois P. Heinz, May 14 2014
Number of partitions of n in which each part i has multiplicity i. Example: a(50)=3 because we have [1,2,2,3,3,3,6,6,6,6,6,6], [1,7,7,7,7,7,7,7], and [3,3,3,4,4,4,4,5,5,5,5,5]. - Emeric Deutsch, Jan 26 2016
The Heinz numbers of integer partitions into distinct pairs are given by A324587. - Gus Wiseman, Mar 09 2019
From Gus Wiseman, Mar 09 2019: (Start)
Equivalent to Emeric Deutsch's comment, a(n) is the number of integer partitions of n where the multiplicities (where if x < y the multiplicity of x is counted prior to the multiplicity of y) are equal to the distinct parts in increasing order. The Heinz numbers of these partitions are given by A109298. For example, the first 30 terms count the following integer partitions:
1: (1)
4: (22)
5: (221)
9: (333)
10: (3331)
13: (33322)
14: (333221)
16: (4444)
17: (44441)
20: (444422)
21: (4444221)
25: (55555)
25: (4444333)
26: (555551)
26: (44443331)
29: (5555522)
29: (444433322)
30: (55555221)
30: (4444333221)
The case where the distinct parts are taken in decreasing order is A324572, with Heinz numbers given by A324571.
(End)
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
M. Brack, M. V. N. Murthy, and J. Bartel, Application of semiclassical methods to number theory, University of Regensburg (Germany, 2020).
Vaclav Kotesovec, Graph - The asymptotic ratio.
M. V. N. Murthy, Matthias Brack, Rajat K. Bhaduri, and Johann Bartel, Semi-classical analysis of distinct square partitions, arXiv:1808.05146 [cond-mat.stat-mech], 2018.
FORMULA
G.f.: Product_{n>=1} ( 1+x^(n^2) ).
a(n) ~ exp(3 * 2^(-5/3) * Pi^(1/3) * ((sqrt(2)-1)*zeta(3/2))^(2/3) * n^(1/3)) * ((sqrt(2)-1)*zeta(3/2))^(1/3) / (2^(4/3) * sqrt(3) * Pi^(1/3) * n^(5/6)), where zeta(3/2) = A078434. - Vaclav Kotesovec, Dec 09 2016
See Murthy, Brack, Bhaduri, Bartel (2018) for a more complete asymptotic expansion. - N. J. A. Sloane, Aug 17 2018
EXAMPLE
a(50)=3 because we have [1,4,9,36], [1,49], and [9,16,25]. - Emeric Deutsch, Jan 26 2016
From Gus Wiseman, Mar 09 2019: (Start)
The first 30 terms count the following integer partitions:
1: (1)
4: (4)
5: (4,1)
9: (9)
10: (9,1)
13: (9,4)
14: (9,4,1)
16: (16)
17: (16,1)
20: (16,4)
21: (16,4,1)
25: (25)
25: (16,9)
26: (25,1)
26: (16,9,1)
29: (25,4)
29: (16,9,4)
30: (25,4,1)
30: (16,9,4,1)
(End)
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-1))))
end:
a:= n-> b(n, isqrt(n)):
seq(a(n), n=0..100); # Alois P. Heinz, May 14 2014
MATHEMATICA
nn=10; CoefficientList[Series[Product[(1+x^(k*k)), {k, nn}], {x, 0, nn*nn}], x] (* T. D. Noe, Jul 24 2006 *)
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-1]]]]; a[n_] := b[n, Floor[Sqrt[n]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 21 2015, after Alois P. Heinz *)
nmax = 20; poly = ConstantArray[0, nmax^2 + 1]; poly[[1]] = 1; poly[[2]] = 1; Do[Do[poly[[j + 1]] += poly[[j - k^2 + 1]], {j, nmax^2, k^2, -1}]; , {k, 2, nmax}]; poly (* Vaclav Kotesovec, Dec 09 2016 *)
Table[Length[Select[IntegerPartitions[n], Reverse[Union[#]]==Length/@Split[#]&]], {n, 30}] (* Gus Wiseman, Mar 09 2019 *)
PROG
(PARI) a(n)=polcoeff(prod(k=1, sqrt(n), 1+x^k^2), n)
(PARI) first(n)=Vec(prod(k=1, sqrtint(n), 1+'x^k^2, O('x^(n+1))+1)) \\ Charles R Greathouse IV, Sep 03 2015
(Python)
from functools import cache
from sympy.core.power import isqrt
@cache
def b(n, i):
# Code after Alois P. Heinz
if n == 0: return 1
if i == 0: return 0
i2 = i*i
return b(n, i-1) + (0 if i2 > n else b(n - i2, i-1))
a = lambda n: b(n, isqrt(n))
print([a(n) for n in range(1, 101)]) # Darío Clavijo, Nov 30 2023
CROSSREFS
Cf. A001422, A003995, A078434, A242434 (the same for compositions), A279329.
Row sums of A341040.
KEYWORD
nonn,nice
EXTENSIONS
More terms from Michael Somos
STATUS
approved
Number of ways to write n as sum of squares > 1.
+10
34
0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 2, 1, 1, 0, 2, 3, 1, 1, 2, 3, 1, 1, 3, 3, 3, 1, 5, 3, 3, 1, 5, 5, 3, 3, 5, 7, 3, 3, 6, 8, 6, 3, 9, 8, 8, 3, 9, 10, 9, 6, 9, 14, 9, 8, 11, 15, 12, 9, 15, 15, 16, 9, 18, 18, 18, 13, 19, 23, 18, 17, 21, 28, 22, 19, 26, 30, 28, 19, 31, 34, 34
OFFSET
1,16
COMMENTS
a(A078135(n))=0; a(A078136(n))=1; a(A078137(n))>0;
Conjecture (lower bound): for all k exists b(k) such that a(n)>k for n>b(k); see b(0)=A078135(12)=23 and b(1)=A078136(15)=39. This is true - see comments by Hieronymus Fischer.
Also first difference of A001156 (number of partitions of n into squares). - Wouter Meeussen, Oct 22 2005
Comments from Hieronymus Fischer, Nov 11 2007 (Start): First statement of monotony: a(n+k^2)>=a(n) for all k>1. 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 sum expressions of squares >1 representing n. Then, adding k^2 to those expressions, we get a(n) sums of squares T(i)+k^2, obviously representing n+k^2, thus a(n+k^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 sum expressions of squares >1 representing n; let S(i), 1<=i<=a(m), be the a(m) different sum expressions of squares >1 representing m. Then, adding those expressions, we get a(n) sums of squares 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 author's conjecture holds true. Proof by induction: b(0) exists; if b(k) exists, then a(j)>k for all j>b(k). Setting m:=b(k)+1, we find that there are k+1 sums B(0,i) of squares >1, 1<=i<=k+1, with m=B(0,i). Further there are k+1 such sum expressions B(1,i), B(2,i) and B(3,i), 1<=i<=k+1, representing m+1, m+2 and m+3, respectively. For n>b(k) we have n=m+4*floor((n-m)/4)+(n-m) mod 4.
Thus n=m+r+s*2^2, where r=0,1,2 or 3. Hence n can be written B(r,i)+s*2^2 and there are k+1 such representations. Let q be the maximal number (to be squared) occurring as a term within those sum expressions B(r,i), 0<=r<=3,1<=i<=k+1. We select a number p>q and we set c:=b(k)+p^2. For n>c, we have the k+1 representations B(r(n),i)+s(n)*2^2.
Additionally, for n-p^2 (which is >b(k)) there are also k+1 representations B(r_p,i)+s_p*2^2, where r_p:=r(n-p^2), s_p:=s(n-p^2). Thus n can be written B(r(n),i)+s(n)*2^2, 1<=i<=k+1 and B(r_p,i)+s_p*2^2+p^2, 1<=i<=k+1.
By choice of p all these sum representations of n are different, which implies, that there are 2k+2 such representations. It follows a(n)>2k+2>k+1 for all n>c, which implies, that b(k+1) exists.
A more precise formulation of the author's conjecture is "b(k):=min( n | a(j)>k for all j>n) exists for all k>=0". (End)
A033183(n) <= a(n). [From Reinhard Zumkeller, Nov 07 2009]
LINKS
Reinhard Zumkeller and Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..500 from Reinhard Zumkeller)
Eric Weisstein's World of Mathematics, Square Number.
FORMULA
a(n) = 1/n*Sum_{k=1..n} (A035316(k)-1)*a(n-k), a(0) = 1. - Vladeta Jovovic, Nov 20 2002
G.f. g(x)=product{k>1, 1/(1-x^(k^2))}-1 = 1/((1-x^4)*(1-x^9)*(1-x^16)*(1-x^25)*(1-x^36)*...)-1. - Hieronymus Fischer, Nov 19 2007
a(n) ~ exp(3*Pi^(1/3) * Zeta(3/2)^(2/3) * n^(1/3) / 2^(4/3)) * Zeta(3/2)^(4/3) / (2^(11/3) * sqrt(3) * Pi^(5/6) * n^(11/6)). - Vaclav Kotesovec, Jan 05 2017
EXAMPLE
a(42)=3: 2*3^2+6*2^2 = 4^2+2*3^2+2*2^2 = 5^2+3^2+2*2^2.
MATHEMATICA
Join[{1}, Table[Length[PowersRepresentations[n, n, 2]], {n, 1, 90}]] // Differences
(* or *)
m = 91; CoefficientList[Product[1/(1 - x^(k^2)), {k, 1, m}] + O[x]^m, x] // Differences (* Jean-François Alcover, Mar 01 2019 *)
PROG
(Haskell)
a078134 = p $ drop 2 a000290_list where
p _ 0 = 1
p ks'@(k:ks) x = if x < k then 0 else p ks' (x - k) + p ks x
-- Reinhard Zumkeller, May 04 2013
CROSSREFS
See A134754 for the sequence representing b(k).
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 19 2002
STATUS
approved
Number of ways to partition n into sums of squares of primes.
+10
19
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,26
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)
REFERENCES
R. F. Churchouse, Representation of integers as sums of squares of primes. Caribbean J. Math. 5 (1986), no. 2, 59-65.
LINKS
Roger Woodford, Bounds for the Eventual Positivity of Difference Functions of Partitions, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.3.
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
EXAMPLE
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).
MATHEMATICA
CoefficientList[ Series[ Product[1/(1 - x^Prime[i]^2), {i, 111}], {x, 0, 101}], x] (* Robert G. Wilson v, Sep 20 2004 *)
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 19 2003
STATUS
approved
Numbers which can be written as sum of squares>1.
+10
12
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,1
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
FORMULA
a(n)=n + 12 for n >= 12. - Hieronymus Fischer, Nov 11 2007
MATHEMATICA
Join[{4, 8, 9, 12, 13, 16, 17, 18, 20, 21, 22}, Range[24, 82]] (* Jean-François Alcover, Aug 01 2018 *)
PROG
(PARI) a(n)=if(n>11, n+12, [4, 8, 9, 12, 13, 16, 17, 18, 20, 21, 22][n]) \\ Charles R Greathouse IV, Aug 21 2011
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 19 2002
EXTENSIONS
Edited by N. J. A. Sloane, Oct 17 2009 at the suggestion of R. J. Mathar.
STATUS
approved
Number of partitions of n into parts that are not squarefree.
+10
11
1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 5, 2, 2, 0, 7, 3, 2, 0, 11, 6, 4, 3, 15, 8, 6, 3, 22, 13, 11, 6, 34, 18, 15, 9, 46, 27, 24, 17, 64, 43, 33, 23, 89, 60, 51, 37, 124, 84, 78, 51, 166, 119, 109, 78, 226, 168, 152, 118, 300, 228, 215, 166, 404, 313, 300, 230, 546, 421, 409
OFFSET
0,9
COMMENTS
a(A078135(n)) = 0; a(A078137(n)) > 0.
LINKS
FORMULA
a(n) = A000041(n) - A073576(n) - A117395(n). - Reinhard Zumkeller, Mar 11 2006
G.f.: Product_{k>=1} (1 - mu(k)^2*x^k)/(1 - x^k), where mu(k) is the Moebius function (A008683). - Ilya Gutkovskiy, Dec 30 2016
EXAMPLE
a(12) = #{2*2*3, 2*2*2 + 2*2, 2*2 + 2*2 + 2*2} = 3;
a(13) = #{3*3 + 2*2} = 1.
MAPLE
with(numtheory):
b:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+
`if`(i>n or issqrfree(i), 0, b(n-i, i))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..100); # Alois P. Heinz, Jun 03 2015
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n || SquareFreeQ[i], 0, b[n-i, i]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 30 2015, after Alois P. Heinz *)
PROG
(Haskell)
a114374 = p a013929_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, Jun 01 2015
CROSSREFS
Cf. A256012.
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 09 2006
EXTENSIONS
Offset changed and a(0)=1 prepended by Reinhard Zumkeller, Jun 01 2015
STATUS
approved
Heinz numbers of integer partitions of n into perfect squares (A001156).
+10
11
1, 2, 4, 7, 8, 14, 16, 23, 28, 32, 46, 49, 53, 56, 64, 92, 97, 98, 106, 112, 128, 151, 161, 184, 194, 196, 212, 224, 227, 256, 302, 311, 322, 343, 368, 371, 388, 392, 419, 424, 448, 454, 512, 529, 541, 604, 622, 644, 661, 679, 686, 736, 742, 776, 784, 827, 838
OFFSET
1,2
COMMENTS
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Also products of elements of A011757.
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
4: {1,1}
7: {4}
8: {1,1,1}
14: {1,4}
16: {1,1,1,1}
23: {9}
28: {1,1,4}
32: {1,1,1,1,1}
46: {1,9}
49: {4,4}
53: {16}
56: {1,1,1,4}
64: {1,1,1,1,1,1}
92: {1,1,9}
97: {25}
98: {1,4,4}
MATHEMATICA
Select[Range[100], And@@Cases[FactorInteger[#], {p_, _}:>IntegerQ[Sqrt[PrimePi[p]]]]&]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 08 2019
STATUS
approved
Numbers having exactly one representation as sum of squares>1.
+10
8
4, 8, 9, 12, 13, 17, 18, 21, 22, 26, 27, 30, 31, 35, 39
OFFSET
1,1
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
KEYWORD
nonn,fini,full
AUTHOR
Reinhard Zumkeller, Nov 19 2002
STATUS
approved
Primes which cannot be written as sum of squares>1.
+10
8
2, 3, 5, 7, 11, 19, 23
OFFSET
1,1
COMMENTS
Equivalently, prime numbers which cannot be written as sum of squares of primes (see A078137 for the proof). - Hieronymus Fischer, Nov 11 2007
Equivalently, prime numbers which cannot be written as sum of squares of 2 and 3 (see A078137 for the proof). - Hieronymus Fischer, Nov 11 2007
The sequence is finite, since numbers > 23 can be written as sums of squares >1 (see A078135). - Hieronymus Fischer, Nov 11 2007
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. - Hieronymus Fischer, Nov 11 2007
KEYWORD
nonn,fini,full
AUTHOR
Reinhard Zumkeller, Nov 19 2002
STATUS
approved
Heinz numbers of integer partitions of n into distinct perfect squares (A033461).
+10
8
1, 2, 7, 14, 23, 46, 53, 97, 106, 151, 161, 194, 227, 302, 311, 322, 371, 419, 454, 541, 622, 661, 679, 742, 827, 838, 1009, 1057, 1082, 1193, 1219, 1322, 1358, 1427, 1589, 1619, 1654, 1879, 2018, 2114, 2143, 2177, 2231, 2386, 2437, 2438, 2741, 2854, 2933
OFFSET
1,2
COMMENTS
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Also products of distinct elements of A011757.
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
7: {4}
14: {1,4}
23: {9}
46: {1,9}
53: {16}
97: {25}
106: {1,16}
151: {36}
161: {4,9}
194: {1,25}
227: {49}
302: {1,36}
311: {64}
322: {1,4,9}
371: {4,16}
419: {81}
454: {1,49}
541: {100}
MATHEMATICA
Select[Range[1000], And@@Cases[FactorInteger[#], {p_, k_}:>k==1&&IntegerQ[Sqrt[PrimePi[p]]]]&]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 08 2019
STATUS
approved

Search completed in 0.014 seconds