editing
approved
editing
approved
a(n) is the partial sum of b(n), which is defined as to be the difference between the numbers of primes in (n^2, n^2 + n] and in (n^2 - n, n^2].
proposed
editing
editing
proposed
(PARI) a(n) = sum(i=1, n, primepi(i^2+i) + primepi(i^2-i) - 2*primepi(i^2)); \\ Michel Marcus, May 24 2023
proposed
editing
editing
proposed
A plot of a(n) for n up to 100000 is given in Links. First negative term is a(177) = -7 and first zero term appears at n = 198. It seems that there are more positive terms than negative ones. For example, for n up to 500000, there are 482085 positive terms, 17903 negative terms, and 12 zero terms.
proposed
editing
editing
proposed
A plot of a(n) for n up to 100000 is given in Links. First negative term is a(177) = -7 and first zero term appears at n = 198. It seems that there are more positive terms than negative ones. For example, for n up to 500000, there are 482085 positive terms, 17903 negative terms, and 12 zero terms.
Among the first 350000 terms, there are 12405 negative terms and 10 zero terms. For n <= 350000, the last negative term is a(49834) = -34, the last zero term appears at n = 48834, and a(350000) = 29704.
Conjecture: a(n) > 0 for n > 49834.
proposed
editing
editing
proposed
a(1) = primepi(1^2+1) + primepi(1^2-1) - 2*primepi(1^2) = 1+0-2*0 = 1.
a(2) = a(1) + primepi(2^2+2) + primepi(2^2-2) - 2*primepi(2^2) = 1+3+1-2*2 = 1.
a(3) = a(2) + primepi(3^2+3) + primepi(3^2-3) - 2*primepi(3^2) = 1+5+3-2*4 = 1.
a(4) = a(3) + primepi(4^2+4) + primepi(4^2-4) - 2*primepi(4^2) = 1+8+5-2*6 = 2.
proposed
editing