login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A184172 Number of partitions of n into an odd number of distinct primes. 10
0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 3, 5, 3, 4, 4, 5, 5, 6, 6, 7, 5, 7, 7, 8, 8, 8, 9, 11, 9, 10, 11, 12, 12, 14, 13, 16, 14, 16, 15, 19, 17, 20, 20, 22, 20, 23, 24, 27, 26, 28, 27, 33, 30, 34, 34, 37, 36, 41, 40, 46, 43, 47, 46, 55, 50, 56 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,19

LINKS

Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..2000 from Alois P. Heinz)

FORMULA

G.f.: (1/2)*[Product_{k>=1} (1+z^prime(k)) - Product_{k>=1} (1-z^prime(k))].

a(n) = Sum_{k>=0} A219180(n,2*k+1). - Alois P. Heinz, Nov 15 2012

EXAMPLE

a(33) = 4 because we have [23,7,3], [19,11,3], [17,13,3], and [17,11,5].

MAPLE

g := 1/2*(Product(1+z^ithprime(k), k = 1 .. 120)-Product(1-z^ithprime(k), k = 1 .. 120)): gser := series(g, z = 0, 110): seq(coeff(gser, z, n), n = 0 .. 85);

# second Maple program

with(numtheory):

b:= proc(n, i) option remember;

      `if`(n=0, [1], `if`(i<1, [], zip((x, y)->x+y, b(n, i-1),

       [0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i-1))[]], 0)))

    end:

a:= proc(n) local l; l:= b(n, pi(n));

      add(l[2*i], i=1..iquo(nops(l), 2))

    end:

seq(a(n), n=0..100);  # Alois P. Heinz, Nov 15 2012

MATHEMATICA

b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {}, Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, {}, b[n-Prime[i], i-1]]]}]]]; a[n_] := Module[{l}, l = b[n, PrimePi[n]]; Sum[l[[2*i]], {i, 1, Quotient[Length[l], 2]}]]; Table[a[n], {n, 0, 100}] (* Jean-Fran├žois Alcover, Jan 30 2014, after Alois P. Heinz *)

PROG

(PARI)

parts(n, pred, y)={prod(k=1, n, 1 + if(pred(k), y*x^k + O(x*x^n), 0))}

{my(n=80); (Vec(parts(n, isprime, 1)) - Vec(parts(n, isprime, -1)))/2} \\ Andrew Howroyd, Dec 28 2017

CROSSREFS

Cf. A000586, A184171, A184199.

Sequence in context: A306396 A105068 A120676 * A125973 A227196 A189172

Adjacent sequences:  A184169 A184170 A184171 * A184173 A184174 A184175

KEYWORD

nonn

AUTHOR

Emeric Deutsch (suggested by R. J. Mathar), Jan 09 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 23 10:51 EDT 2021. Contains 345397 sequences. (Running on oeis4.)