OFFSET
1,3
LINKS
FORMULA
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
KEYWORD
AUTHOR
Wesley Ivan Hurt, Oct 20 2017
STATUS
approved