login
A302480
Number of partitions of n into two parts with the smaller part nonprime and the larger part prime.
1
0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 1, 2, 2, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 4, 1, 4, 0, 4, 3, 3, 1, 4, 1, 4, 3, 5, 2, 5, 1, 5, 2, 6, 3, 6, 2, 6, 4, 7, 3, 6, 1, 6, 5, 6, 2, 7, 1, 7, 6, 7, 3, 8, 3, 8, 5, 8, 4, 9, 2, 9, 6, 9, 5, 9, 2, 9, 5
OFFSET
1,17
FORMULA
a(n) = Sum_{i=1..floor(n/2)} (1 - A010051(i)) * A010051(n-i).
EXAMPLE
a(17) = 2; 17 = 13+4 = 11+6, smaller parts are nonprimes larger are prime.
MATHEMATICA
Table[Sum[(PrimePi[n - i] - PrimePi[n - i - 1]) (1 - (PrimePi[i] - PrimePi[i - 1])), {i, Floor[n/2]}], {n, 100}]
PROG
(PARI) a(n) = sum(i=1, n\2, (1-isprime(i))*isprime(n-i)); \\ Michel Marcus, Apr 09 2018
CROSSREFS
Sequence in context: A210868 A176853 A261787 * A329656 A000374 A355735
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 08 2018
STATUS
approved