login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A201250
Integers k such that 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).
0
1, 3, 8, 16, 36, 38, 70, 108, 116, 148, 251, 280, 1964
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
Cf. A000720.
Sequence in context: A024623 A337118 A344509 * A196373 A027291 A048952
KEYWORD
nonn,more
AUTHOR
Daniel Tisdale, Nov 28 2011
EXTENSIONS
New name and a(13) from Michel Marcus, Aug 16 2022
STATUS
approved