OFFSET
1,6
FORMULA
a(n) = Sum_{k=1..n} [pi(k) = pi(n-k+1)], where pi is the prime counting function (A000720) and [ ] is the Iverson bracket.
EXAMPLE
There are two cases for a(6) due to symmetry, namely k=3: pi(3) = 2 = pi(6-3+1) and k=4: pi(4) = 2 = pi(6-4+1).
MATHEMATICA
Table[Sum[KroneckerDelta[PrimePi[n - k + 1], PrimePi[k]], {k, n}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n, primepi(k) == primepi(n-k+1)); \\ Michel Marcus, May 01 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 30 2023
STATUS
approved