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.

A339380 Number of partitions of n into an even number of primes (counting 1 as a prime).

This page as a plain text file.
%I A339380 #8 Aug 20 2024 18:22:12
%S A339380 1,0,1,1,3,2,5,4,9,7,14,11,22,18,33,27,48,40,69,58,97,82,134,114,183,
%T A339380 157,246,212,327,284,431,376,562,493,728,640,934,825,1191,1056,1508,
%U A339380 1341,1899,1694,2377,2126,2960,2654,3668,3297,4523,4075,5554,5015,6792,6145
%N A339380 Number of partitions of n into an even number of primes (counting 1 as a prime).
%H A339380 <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F A339380 G.f.: (1/2) * ((1/(1 - x)) * Product_{k>=1} 1 / (1 - x^prime(k)) + (1/(1 + x)) * Product_{k>=1} 1 / (1 + x^prime(k))).
%F A339380 a(n) = (A034891(n) + A338826(n)) / 2.
%e A339380 a(6) = 5 because we have [5, 1], [3, 3], [3, 1, 1, 1], [2, 2, 1, 1] and [1, 1, 1, 1, 1, 1].
%p A339380 b:= proc(n, i, t) option remember; (p->
%p A339380       `if`(n=0, t, `if`(i<0, 0, b(n, i-1, t)+
%p A339380       `if`(p>n, 0, b(n-p, i, 1-t)))))(`if`(i<1, 1, ithprime(i)))
%p A339380     end:
%p A339380 a:= n-> b(n, numtheory[pi](n), 1):
%p A339380 seq(a(n), n=0..60);  # _Alois P. Heinz_, Dec 02 2020
%t A339380 nmax = 55; CoefficientList[Series[(1/2) ((1/(1 - x)) Product[1/(1 - x^Prime[k]), {k, 1, nmax}] + (1/(1 + x)) Product[1/(1 + x^Prime[k]), {k, 1, nmax}]), {x, 0, nmax}], x]
%t A339380 Table[Count[(Boole[PrimeQ/@(IntegerPartitions[n]/.(1->2))]),_?(EvenQ[Length[#]] && FreeQ[ #,0]&)],{n,0,60}] (* _Harvey P. Dale_, Aug 20 2024 *)
%Y A339380 Cf. A000607, A008578, A027187, A034891, A184171, A184172, A184198, A184199, A338826, A339381, A339382, A339383.
%K A339380 nonn
%O A339380 0,5
%A A339380 _Ilya Gutkovskiy_, Dec 02 2020