login
A291564
Number of partitions of 2n into two parts such that one part is prime and the other is nonprime.
4
0, 1, 2, 2, 1, 3, 3, 2, 3, 4, 3, 3, 4, 5, 4, 7, 4, 3, 9, 6, 5, 8, 7, 5, 7, 9, 6, 10, 9, 5, 13, 8, 6, 15, 9, 8, 12, 11, 7, 14, 13, 7, 14, 15, 6, 16, 15, 10, 19, 13, 10, 17, 16, 12, 17, 15, 10, 18, 19, 6, 23, 20, 10, 25, 17, 14, 21, 22, 17, 20, 19, 12, 23, 24
OFFSET
1,3
FORMULA
a(n) = n - Sum_{i=1..n} [A010051(i) = A010051(2n-i)], where [] is the Iverson bracket.
a(n) = n - A291563(n).
MAPLE
a:= n-> add(`if`(isprime(n+i) xor isprime(n-i), 1, 0), i=1..n-1):
seq(a(n), n=1..80); # Alois P. Heinz, Mar 05 2021
MATHEMATICA
Table[n - Sum[KroneckerDelta[(PrimePi[k] - PrimePi[k - 1]), (PrimePi[2 n - k] - PrimePi[2 n - 1 - k])], {k, n}], {n, 80}]
CROSSREFS
Sequence in context: A254044 A274515 A362500 * A029266 A325035 A348331
KEYWORD
nonn,look,easy
AUTHOR
Wesley Ivan Hurt, Oct 20 2017
STATUS
approved