A341973 Number of partitions of n into 2 distinct primes (counting 1 as a prime).
1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 2, 1, 2, 0, 3, 1, 3, 1, 2, 0, 4, 1, 2, 0, 2, 0, 4, 1, 3, 1, 3, 0, 4, 0, 2, 1, 3, 0, 5, 1, 4, 1, 3, 0, 6, 1, 4, 0, 3, 0, 6, 1, 3, 0, 3, 0, 7, 1, 3, 1, 5, 0, 6, 0, 3, 1, 5, 0, 7, 1, 5, 1, 5, 0, 7, 0, 5, 1, 4, 0, 9, 1, 4, 0, 4, 0, 10, 1, 4, 0, 4, 0, 7
Offset: 3
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 3..10000
Programs
-
Maple
b:= proc(n, i) option remember; series(`if`(n=0, 1, `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))( `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 3) end: a:= n-> coeff(b(n, numtheory[pi](n)), x, 2): seq(a(n), n=3..96); # Alois P. Heinz, Feb 24 2021
-
Mathematica
a[n_] := Select[IntegerPartitions[n, {2}, Join[{1}, Prime[Range[PrimePi[n-1]]]]], #[[1]] != #[[2]]&] // Length; a /@ Range[3, 100] (* Jean-François Alcover, Jul 13 2021 *)