A269329 Number of partitions of a positive integer n into two distinct primes such that for even n, it is of the form n = p + q and for odd n, it is of the form n = 2p' + q'.
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 4, 2, 2, 2, 2, 2, 3, 3, 3, 2, 4, 2, 4, 3, 2, 2, 4, 3, 3, 4, 4, 1, 3, 3, 5, 4, 4, 3, 6, 3, 4, 5, 4, 4, 6, 3, 5, 5, 3, 3, 6, 3, 3, 6, 3, 2, 7, 5, 7, 6, 5, 2, 6, 5, 4, 6, 4, 4, 8, 5, 7, 7, 5, 4, 8, 4, 4, 8, 7, 4, 7, 4, 7, 9, 4, 4, 10, 4, 5, 7, 6, 3, 9
Offset: 1
Keywords
Examples
a(23)=3. Hence there are 3 partitions (as defined above) of the odd integer 23, namely 19+2+2, 17+3+3 and 13+5+5. a(24)=3. Hence there are 3 partitions of the even integer 24, namely 19+5, 17+7 and 13+11.
Programs
-
Mathematica
parts[n_, a_, b_] := Select[IntegerPartitions[n, {a+b}, Prime@Range[PrimePi[n]]], Length[Union@#]==2&&MemberQ[Values@Counts@#, a] &]; lst1=Table[Length@parts[2n-1, 1, 2], {n, 1, 200}]; lst2=Table[Length@parts[2n, 1, 1], {n, 1, 200}]; Riffle[lst1, lst2]
Comments