[go: up one dir, main page]

login
Search: a046675 -id:a046675
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of partitions of n into prime parts.
(Formerly M0265 N0093)
+10
172
1, 0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 19, 23, 26, 30, 35, 40, 46, 52, 60, 67, 77, 87, 98, 111, 124, 140, 157, 175, 197, 219, 244, 272, 302, 336, 372, 413, 456, 504, 557, 614, 677, 744, 819, 899, 987, 1083, 1186, 1298, 1420, 1552, 1695, 1850, 2018, 2198, 2394, 2605, 2833, 3079, 3344
OFFSET
0,6
COMMENTS
a(n) gives the number of values of k such that A001414(k) = n. - Howard A. Landman, Sep 25 2001
Let W(n) = {prime p: There is at least one number m whose spf is p, and sopfr(m) = n}. Let V(n,p) = {m: sopfr(m) = n, p belongs to W(n)}. Then a(n) = sigma(|V(n,p)|). E.g.: W(10) = {2,3,5}, V(10,2) = {30,32,36}, V(10,3) = {21}, V(10,5) = {25}, so a(10) = 3+1+1 = 5. - David James Sycamore, Apr 14 2018
From Gus Wiseman, Jan 18 2020: (Start)
Also the number of integer partitions such that the sum of primes indexed by the parts is n. For example, the sum of primes indexed by the parts of the partition (3,2,1,1) is prime(3)+prime(2)+prime(1)+prime(1) = 12, so (3,2,1,1) is counted under a(12). The a(2) = 1 through a(14) = 10 partitions are:
1 2 11 3 22 4 32 41 33 5 43 6 44
21 111 31 221 222 42 322 331 51 52
211 1111 311 321 411 421 332 431
2111 2211 2221 2222 422 3222
11111 3111 3211 3221 3311
21111 22111 4111 4211
111111 22211 22221
31111 32111
211111 221111
1111111
(End)
REFERENCES
R. Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; see p. 203.
Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
B. C. Berndt and B. M. Wilson, Chapter 5 of Ramanujan's second notebook, pp. 49-78 of Analytic Number Theory (Philadelphia, 1980), Lect. Notes Math. 899, 1981, see Entry 29.
D. M. Burton, Elementary Number Theory, 5th ed., McGraw-Hill, 2002.
L. M. Chawla and S. A. Shad, On a trio-set of partition functions and their tables, J. Natural Sciences and Mathematics, 9 (1969), 87-96.
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
Hans Havermann, Table of n, a(n) for n = 0..50000 (first 1000 terms from T. D. Noe, terms 1001-20000 from Vaclav Kotesovec, terms 20001-50000 extracted from files by Hans Havermann)
K. Alladi and P. Erdős, On an additive arithmetic function, Pacific J. Math., Volume 71, Number 2 (1977), 275-294.
George E. Andrews, Arnold Knopfmacher, and John Knopfmacher, Engel expansions and the Rogers-Ramanujan identities, J. Number Theory 80 (2000), 273-290. See Eq. 2.1.
George E. Andrews, Arnold Knopfmacher, and Burkhard Zimmermann, On the Number of Distinct Multinomial Coefficients, Journal of Number Theory, Volume 118, Issue 1, May 2006, pp. 15-30.
Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.
Paul Barry, Three Études on a sequence transformation pipeline, arXiv:1803.06408 [math.CO], 2018.
Johann Bartel, R. K. Bhaduri, Matthias Brack, and M. V. N. Murthy, Asymptotic prime partitions of integers, Phys. Rev. E, 95 (2017), 052108, arXiv:1609.06497 [math-ph], 2016-2017.
P. T. Bateman and P. Erdős, Partitions into primes, Publ. Math. Debrecen 4 (1956), 198-200.
J. Browkin, Sur les décompositions des nombres naturels en sommes de nombres premiers, Colloquium Mathematicum 5 (1958), 205-207.
Edward A. Bender, Asymptotic methods in enumeration, SIAM Review 16 (1974), no. 4, p. 509.
L. M. Chawla and S. A. Shad, Review of "On a trio-set of partition functions and their tables", Mathematics of Computation, Vol. 24, No. 110 (Apr., 1970), pp. 490-491.
P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see Section VIII.6, pp. 576ff.
H. Gupta, Partitions into distinct primes, Proc. Nat. Acad. Sci. India, 21 (1955), 185-187.
O. P. Gupta and S. Luthra, Partitions into primes, Proc. Nat. Inst. Sci. India. Part A. 21 (1955), 181-184.
R. K. Guy, Letter to N. J. A. Sloane, 1988-04-12. (annotated scanned copy)
R. K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712.
R. K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
BongJu Kim, Partition number identities which are true for all set of parts, arXiv:1803.08095 [math.CO], 2018.
Vaclav Kotesovec, Wrong asymptotics of OEIS A000607? (MathOverflow). Includes discussion of the contradiction between the results for the next-to-leading term in the asymptotic formulas by Vaughan and by Bartel et al.
John F. Loase (splurge(AT)aol.com), David Lansing, Cassie Hryczaniuk and Jamie Cahoon, A Variant of the Partition Function, College Mathematics Journal, Vol. 36, No. 4 (Sep 2005), pp. 320-321.
Ljuben Mutafchiev, A Note on Goldbach Partitions of Large Even Integers, arXiv:1407.4688 [math.NT], 2014-2015.
Igor Pak, Complexity problems in enumerative combinatorics, arXiv:1803.06636 [math.CO], 2018.
N. J. A. Sloane, Transforms.
R. C. Vaughan, On the number of partitions into primes, Ramanujan J. vol. 15, no. 1 (2008) 109-121.
Eric Weisstein's World of Mathematics, Prime Partition.
Roger Woodford, Bounds for the Eventual Positivity of Difference Functions of Partitions, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.3.
FORMULA
Asymptotically a(n) ~ exp(2 Pi sqrt(n/log n) / sqrt(3)) (Ayoub).
a(n) = (1/n)*Sum_{k=1..n} A008472(k)*a(n-k). - Vladeta Jovovic, Aug 27 2002
G.f.: 1/Product_{k>=1} (1-x^prime(k)).
See the partition arrays A116864 and A116865.
From Vaclav Kotesovec, Sep 15 2014 [Corrected by Andrey Zabolotskiy, May 26 2017]: (Start)
It is surprising that the ratio of the formula for log(a(n)) to the approximation 2 * Pi * sqrt(n/(3*log(n))) exceeds 1. For n=20000 the ratio is 1.00953, and for n=50000 (using the value from Havermann's tables) the ratio is 1.02458, so the ratio is increasing. See graph above.
A more refined asymptotic formula is found by Vaughan in Ramanujan J. 15 (2008), pp. 109-121, and corrected by Bartel et al. (2017): log(a(n)) = 2*Pi*sqrt(n/(3*log(n))) * (1 - log(log(n))/(2*log(n)) + O(1/log(n))).
See Bartel, Bhaduri, Brack, Murthy (2017) for a more complete asymptotic expansion. (End)
G.f.: 1 + Sum_{i>=1} x^prime(i) / Product_{j=1..i} (1 - x^prime(j)). - Ilya Gutkovskiy, May 07 2017
a(n) = A184198(n) + A184199(n). - Vaclav Kotesovec, Jan 11 2021
EXAMPLE
n = 10 has a(10) = 5 partitions into prime parts: 10 = 2 + 2 + 2 + 2 + 2 = 2 + 2 + 3 + 3 = 2 + 3 + 5 = 3 + 7 = 5 + 5.
n = 15 has a(15) = 12 partitions into prime parts: 15 = 2 + 2 + 2 + 2 + 2 + 2 + 3 = 2 + 2 + 2 + 3 + 3 + 3 = 2 + 2 + 2 + 2 + 2 + 5 = 2 + 2 + 2 + 2 + 7 = 2 + 2 + 3 + 3 + 5 = 2 + 3 + 5 + 5 = 2 + 3 + 3 + 7 = 2 + 2 + 11 = 2 + 13 = 3 + 3 + 3 + 3 + 3 = 3 + 5 + 7 = 5 + 5 + 5.
MAPLE
with(gfun):
t1:=mul(1/(1-q^ithprime(n)), n=1..51):
t2:=series(t1, q, 50):
t3:=seriestolist(t2); # fixed by Vaclav Kotesovec, Sep 14 2014
MATHEMATICA
CoefficientList[ Series[1/Product[1 - x^Prime[i], {i, 1, 50}], {x, 0, 50}], x]
f[n_] := Length@ IntegerPartitions[n, All, Prime@ Range@ PrimePi@ n]; Array[f, 57] (* Robert G. Wilson v, Jul 23 2010 *)
Table[Length[Select[IntegerPartitions[n], And@@PrimeQ/@#&]], {n, 0, 60}] (* Harvey P. Dale, Apr 22 2012 *)
a[n_] := a[n] = If[PrimeQ[n], 1, 0]; c[n_] := c[n] = Plus @@ Map[# a[#] &, Divisors[n]]; b[n_] := b[n] = (c[n] + Sum[c[k] b[n - k], {k, 1, n - 1}])/n; Table[b[n], {n, 1, 20}] (* Thomas Vogler, Dec 10 2015: Uses Euler transform, caches computed values, faster than IntegerPartitions[] function. *)
nmax = 100; pmax = PrimePi[nmax]; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = 0; poly[[3]] = -1; Do[p = Prime[k]; Do[poly[[j + 1]] -= poly[[j + 1 - p]], {j, nmax, p, -1}]; , {k, 2, pmax}]; s = Sum[poly[[k + 1]]*x^k, {k, 0, Length[poly] - 1}]; CoefficientList[Series[1/s, {x, 0, nmax}], x] (* Vaclav Kotesovec, Jan 11 2021 *)
PROG
(PARI) N=66; x='x+O('x^N); Vec(1/prod(k=1, N, 1-x^prime(k))) \\ Joerg Arndt, Sep 04 2014
(Haskell)
a000607 = p a000040_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, Aug 05 2012
(Sage) [Partitions(n, parts_in=prime_range(n + 1)).cardinality() for n in range(100)] # Giuseppe Coppoletta, Jul 11 2016
(Python)
from sympy import primefactors
l = [1, 0]
for n in range(2, 101):
l.append(sum(sum(primefactors(k)) * l[n - k] for k in range(1, n + 1)) / n)
l # Indranil Ghosh, Jul 13 2017
(Magma) [1] cat [#RestrictedPartitions(n, {p:p in PrimesUpTo(n)}): n in [1..100]]; // Marius A. Burtea, Jan 02 2019
CROSSREFS
G.f. = 1 / g.f. for A046675. See A046113 for the ordered (compositions) version.
Row sums of array A116865 and of triangle A261013.
Column sums of A331416.
Partitions whose Heinz number is divisible by their sum of primes are A330953.
Partitions of whose sum of primes is divisible by their sum are A331379.
KEYWORD
easy,nonn,nice
STATUS
approved
Number of partitions of n into distinct primes.
(Formerly M0022 N0004 N0039)
+10
85
1, 0, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 4, 4, 4, 5, 5, 5, 6, 5, 6, 7, 6, 9, 7, 9, 9, 9, 11, 11, 11, 13, 12, 14, 15, 15, 17, 16, 18, 19, 20, 21, 23, 22, 25, 26, 27, 30, 29, 32, 32, 35, 37, 39, 40, 42, 44, 45, 50, 50, 53, 55, 57, 61, 64, 67, 70, 71, 76, 78, 83, 87, 89, 93, 96
OFFSET
0,6
REFERENCES
H. Gupta, Certain averages connected with partitions. Res. Bull. Panjab Univ. no. 124 1957 427-430.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence in two entries, N0004 and N0039).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1000 from T. D. Noe)
Edray Herber Goins and Talitha M. Washington, On the generalized climbing stairs problem, Ars Combin. 117 (2014), 183-190. MR3243840 (Reviewed), arXiv:0909.5459 [math.CO], 2009.
H. Gupta, Partitions into distinct primes, Proc. Nat. Acad. Sci. India, 21 (1955), 185-187. [broken link]
BongJu Kim, Partition number identities which are true for all set of parts, arXiv:1803.08095 [math.CO], 2018.
Vaclav Kotesovec, Plot of log(a(n)) / log(Qas(n)) for n = 2..10^8, for Qas see the formula (25) from the article by Murthy, Brack and Bhaduri, p. 7.
M. V. N. Murthy, M. Brack, R. K. Bhaduri, On the asymptotic distinct prime partitions of integers, arXiv:1904.02776 [math.NT], Mar 22 2019.
K. F. Roth and G. Szekeres, Some asymptotic formulae in the theory of partitions, Quart. J. Math., Oxford Ser. (2) 5 (1954), 241-259.
FORMULA
G.f.: Product_{k>=1} (1+x^prime(k)).
a(n) = A184171(n) + A184172(n). - R. J. Mathar, Jan 10 2011
a(n) = Sum_{k=0..A024936(n)} A219180(n,k). - Alois P. Heinz, Nov 13 2012
log(a(n)) ~ Pi*sqrt(2*n/(3*log(n))) [Roth and Szekeres, 1954]. - Vaclav Kotesovec, Sep 13 2018
EXAMPLE
n=16 has a(16) = 3 partitions into distinct prime parts: 16 = 2+3+11 = 3+13 = 5+11.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+`if`(ithprime(i)>n, 0, b(n-ithprime(i), i-1))))
end:
a:= n-> b(n, numtheory[pi](n)):
seq(a(n), n=0..100); # Alois P. Heinz, Nov 15 2012
MATHEMATICA
CoefficientList[Series[Product[(1+x^Prime[k]), {k, 24}], {x, 0, Prime[24]}], x]
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i-1] + If[Prime[i] > n, 0, b[n - Prime[i], i-1]]]]; a[n_] := b[n, PrimePi[n]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
nmax = 100; pmax = PrimePi[nmax]; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = 0; poly[[3]] = 1; Do[p = Prime[k]; Do[poly[[j]] += poly[[j - p]], {j, nmax + 1, p + 1, -1}]; , {k, 2, pmax}]; poly (* Vaclav Kotesovec, Sep 20 2018 *)
PROG
(Haskell)
a000586 = p a000040_list where
p _ 0 = 1
p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
-- Reinhard Zumkeller, Aug 05 2012
(PARI) a(n, k=n)=if(n<1, !n, my(s); forprime(p=2, k, s+=a(n-p, p-1)); s) \\ Charles R Greathouse IV, Nov 20 2012
(Python)
from sympy import isprime, primerange
from functools import cache
@cache
def a(n, k=None):
if k == None: k = n
if n < 1: return int(n == 0)
return sum(a(n-p, p-1) for p in primerange(1, k+1))
print([a(n) for n in range(83)]) # Michael S. Branicky, Sep 03 2021 after Charles R Greathouse IV
CROSSREFS
Cf. A000041, A070215, A000607 (parts may repeat), A112022, A000009, A046675, A319264, A319267.
KEYWORD
nonn,nice,easy
EXTENSIONS
Entry revised by N. J. A. Sloane, Jun 10 2012
STATUS
approved
Expansion of Product_{k>=1} (1 - mu(k)^2*x^k), where mu() is the Moebius function (A008683).
+10
3
1, -1, -1, 0, 1, 0, -1, 1, 2, 0, -3, 0, 2, 0, -3, 0, 5, 0, -4, -2, 4, 0, -5, 0, 7, 3, -8, -1, 5, 1, -10, 0, 13, 2, -10, -3, 14, -2, -17, -3, 21, 5, -22, 0, 22, 4, -34, -5, 33, 9, -33, -10, 43, 6, -43, -19, 52, 16, -51, -13, 56, 24, -71, -20, 64, 26, -78, -24, 90, 24, -90, -39, 112, 26, -115, -37
OFFSET
0,9
COMMENTS
Convolution inverse of A073576.
The difference between the number of partitions of n into an even number of distinct squarefree parts and the number of partitions of n into an odd number of distinct squarefree parts.
FORMULA
G.f.: Product_{k>=1} (1 - x^A005117(k)).
MAPLE
with(numtheory):
b:= proc(n) option remember; `if`(n=0, 1, add(add(d*
abs(mobius(d)), d=divisors(j)) *b(n-j), j=1..n)/n)
end:
a:= proc(n) option remember; `if`(n=0, 1,
-add(b(n-i)*a(i), i=0..n-1))
end:
seq(a(n), n=0..80); # Alois P. Heinz, Sep 20 2017
MATHEMATICA
nmax = 75; CoefficientList[Series[Product[1 - MoebiusMu[k]^2 x^k, {k, 1, nmax}], {x, 0, nmax}], x]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Sep 19 2017
STATUS
approved
G.f.: Product_{k>=1} (1-prime(k)*x^prime(k)).
+10
3
1, 0, -2, -3, 0, 1, 0, 3, 15, 14, -9, -11, -7, 9, -37, -79, 28, 193, -46, -150, -142, -58, -142, 171, 73, 652, 643, 349, -1047, 404, -2743, 873, 3082, 2498, -3039, 411, -2188, 4534, -4571, -9997, -5917, 32879, -14830, -11926, -16333, 7208, -22517, 59885, -27601
OFFSET
0,3
LINKS
FORMULA
Convolution inverse of A002098.
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Jan 14 2018
STATUS
approved
Expansion of (1 - x)*Product_{k>=1} (1 - x^prime(k)).
+10
3
1, -1, -1, 0, 1, 0, 0, 0, 1, 0, -1, -1, 1, 0, 0, 0, 1, -1, 0, -1, 1, 0, 0, -1, 2, 0, -1, -1, 1, -1, 1, -1, 2, 0, 0, -2, 2, -2, 0, 0, 3, -2, 1, -2, 2, -1, 0, -3, 5, -1, 0, -3, 3, -3, 3, -3, 3, -1, 2, -5, 6, -4, 1, -2, 6, -5, 3, -6, 5, -2, 4, -8, 9, -5, 3, -5, 7, -8, 7, -8, 8, -4, 5
OFFSET
0,25
COMMENTS
The difference between the number of partitions of n into an even number of distinct prime parts (including 1) and the number of partitions of n into an odd number of distinct prime parts (including 1).
Convolution inverse of A034891.
FORMULA
G.f.: (1 - x)*Product_{k>=1} (1 - x^prime(k)).
MATHEMATICA
nmax = 82; CoefficientList[Series[(1 - x) Product[(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]
CROSSREFS
Cf. A000586, A000607, A034891, A036497, A046675 (partial sums).
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Jan 22 2018
STATUS
approved
Maximal coefficient of Product_{j=1..n} (1 - x^prime(j)).
+10
3
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 6, 8, 12, 17, 30, 41, 70, 107, 186, 307, 531, 887, 1561, 2701, 4817, 8514, 15030, 26490, 47200, 84622, 151809, 273912, 496807, 900595, 1643185, 2999837, 5498916, 10111429, 18596096, 34306158, 63585519, 118215700
OFFSET
0,11
LINKS
MAPLE
b:= proc(n) option remember; `if`(n=0, 1,
expand((1-x^ithprime(n))*b(n-1)))
end:
a:= n-> max(coeffs(b(n))):
seq(a(n), n=0..60);
MATHEMATICA
a[n_] := Times@@(1-x^Prime[Range[n]])//Expand//CoefficientList[#, x]&//Max;
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 02 2022 *)
PROG
(Python)
from sympy.abc import x
from sympy import prime, prod
def A350514(n): return 1 if n == 0 else max(prod(1-x**prime(i) for i in range(1, n+1)).as_poly().coeffs()) # Chai Wah Wu, Jan 04 2022
(PARI) a(n) = vecmax(Vec(prod(j=1, n, 1-'x^prime(j)))); \\ Michel Marcus, Jan 04 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 02 2022
STATUS
approved
Decimal expansion of product_{p=primes} (1-1/2^p).
+10
2
6, 3, 0, 3, 8, 4, 4, 0, 5, 9, 9, 1, 3, 6, 6, 1, 5, 4, 6, 0, 2, 2, 2, 5, 8, 2, 2, 9, 3, 1, 3, 2, 9, 2, 4, 6, 6, 9, 4, 9, 4, 1, 4, 4, 8, 4, 6, 7, 2, 9, 9, 2, 9, 5, 6, 2, 0, 1, 8, 1, 0, 7, 1, 4, 3, 0, 0, 8, 6, 8, 0, 1, 5, 2, 2, 2, 2, 5, 2, 3, 9, 7, 2, 2, 3, 4, 0, 9, 9
OFFSET
0,1
FORMULA
Equals product_{p in A000040} (1-2^(-p)) = sum_{n>=0} A046675(n)/2^n.
EXAMPLE
(1-1/2^2) *(1-1/2^3) *(1-1/2^5) *(1-1/2^7) *(1-1/2^11) *.... = 0.63038440599136615460222582...
MATHEMATICA
RealDigits[Times@@(1-1/2^Prime[Range[100]]), 10, 120][[1]] (* Harvey P. Dale, Jun 26 2011 *)
KEYWORD
cons,nonn
AUTHOR
R. J. Mathar, Jan 09 2011
STATUS
approved
Expansion of Product_{k>=1} (1 - x^k)/(1 - x^prime(k)).
+10
2
1, -1, 0, 0, -1, 1, -1, 1, -1, 0, 1, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, -1, 1, -1, 1, -2, 1, -1, 0, 1, -1, 1, -2, 2, -1, -1, 2, -1, -1, 2, -2, 2, -1, 1, 0, -1, 1, 0, 1, -2, 2, 0, 0, 2, -1, 0, 0, 1, 0, 0, 1, -2, 0, -1, 0, 0, -2, 2, -3, 0, 2, -2, 1, -1, 1, -2, 1, -1, -1, 1
OFFSET
0,26
COMMENTS
The difference between the number of partitions of n into an even number of distinct nonprime parts and the number of partitions of n into an odd number of distinct nonprime parts.
Convolution of the sequences A000607 and A010815.
FORMULA
G.f.: Product_{k>=1} (1 - x^A018252(k)).
MATHEMATICA
nmax = 80; CoefficientList[Series[Product[(1 - x^k)/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]
nmax = 80; CoefficientList[Series[Product[(1 - Boole[!PrimeQ[k]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 03 2018
STATUS
approved
Expansion of Product_{p prime, k>=1} (1 - x^(p^k)).
+10
2
1, 0, -1, -1, -1, 0, 1, 1, 0, 0, 1, 1, 1, 0, -1, -1, -2, -1, 0, 0, 1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, -3, -3, -1, 1, 1, 0, -1, -1, 2, 2, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, 0, -2, -3, -1, -1, 0, 2, 0, 1, 3, 0, 1, 3, 1, -3, -2, -3, -2, 3, 2, -1, 0, -2, 1, 1, -2, -1, 1, 2, 2, 3, -1, -2, 4
OFFSET
0,17
COMMENTS
Convolution inverse of A023894.
The difference between the number of partitions of n into an even number of distinct prime power parts and the number of partitions of n into an odd number of distinct prime power parts (1 excluded).
Conjecture: the last zero (38th) occurs at n = 340.
LINKS
FORMULA
G.f.: Product_{k>=1} (1 - x^A246655(k)).
MAPLE
N:= 100: # for a(0)..a(N)
R:= 1:
p:= 1:
do
p:= nextprime(p);
if p > N then break fi;
for k from 1 to floor(log[p](N)) do
R:= series(R*(1-x^(p^k)), x, N+1)
od;
od:
seq(coeff(R, x, j), j=0..N); # Robert Israel, Nov 03 2019
MATHEMATICA
nmax = 90; CoefficientList[Series[Product[(1 - Boole[PrimePowerQ[k]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]
a[n_] := a[n] = If[n == 0, 1, -Sum[Sum[Boole[PrimePowerQ[d]] d, {d, Divisors[k]}] a[n - k], {k, 1, n}]/n]; Table[a[n], {n, 0, 90}]
CROSSREFS
KEYWORD
sign,look
AUTHOR
Ilya Gutkovskiy, Nov 01 2019
STATUS
approved
G.f.: (1/(1 + x)) * Product_{k>=1} 1/(1 + x^prime(k)).
+10
2
1, -1, 0, -1, 2, -2, 2, -3, 4, -4, 5, -7, 8, -9, 11, -13, 15, -18, 21, -24, 28, -32, 37, -43, 49, -55, 63, -72, 81, -92, 104, -117, 131, -147, 166, -185, 206, -231, 257, -285, 317, -353, 391, -432, 478, -528, 583, -643, 708, -778, 855, -940, 1031, -1130, 1238, -1354
OFFSET
0,5
COMMENTS
The difference between the number of partitions of n into an even number of prime parts (including 1) and the number of partitions of n into an odd number of prime parts (including 1).
Convolution inverse of A036497.
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n-k) * A048165(k).
MATHEMATICA
nmax = 55; CoefficientList[Series[(1/(1 + x)) Product[1/(1 + x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]
a[n_] := a[n] = If[n == 0, 1, Sum[DivisorSum[k, (-1)^(k/#) # &, PrimeQ[#] || # == 1 &] a[n - k], {k, 1, n}]/n]; Table[a[n], {n, 0, 55}]
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Dec 02 2020
STATUS
approved

Search completed in 0.014 seconds