OFFSET
1,2
FORMULA
A_n = Sum_{i=1..n-1} (-1)^i * pi((n-i+1)^2);
B_n = Sum_{i=1..n-1} (-1)^i * pi((n-i)^2);
Sequence is S_n = {index(A_n - B_n) such that A_n - B_n = 0}.
EXAMPLE
For k = 3, pi(3^2)-pi(2^2) = 2 = pi(2^2)-pi(1^2), so 3 is a term.
PROG
(PARI) isok(k) = sum(i=1, k-1, (-1)^(i+1)*primepi((k-i+1)^2)) == sum(i=1, k-1, (-1)^(i+1)*primepi((k-i)^2)); \\ Michel Marcus, Aug 16 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Daniel Tisdale, Nov 28 2011
EXTENSIONS
New name and a(13) from Michel Marcus, Aug 16 2022
STATUS
approved