OFFSET
1,1
COMMENTS
The difference d(x) = pi(x,4,3) - pi(x,4,1) changes sign infinitely often, see link "Prime Quadratic Effect". But this does not say anything about the amplitudes of these oscillations. For diagrams, see link "Oscillations of d(x)". If d(x) has no upper limit, the current sequence is infinite. Regarding the lower limit, see A349519.
LINKS
Gerhard Kirchner, Oscillations of d(x)
Eric Weisstein's World of Mathematics, Prime Quadratic Effect.
EXAMPLE
primes 4*j+1: 5, 13, 17, ...
4*j+3: 3, 7, 11, ...
d(x) = pi(x,4,3) - pi(x,4,1)
.
n x pi(x,4,3) pi(x,4,1) d(x)=n-1?
- -- --------- --------- ---------
1 2 0 0 0=0 true a(1) = 2
2 3 1 0 1=1 true a(2) = 3
3 5 1 1 0=2 false a(3) != 5
...........................
3 11 3 1 2=2 true a(3) = 11
PROG
(Maxima) block(w:[2], su:0, sum:0, n:1, p:2, nmax: 40,
/* returns nmax terms */
while n<nmax do(
p: next_prime(p), su:su+mod(p, 4)-2,
if su>sum then(n:n+1, sum:su, w: append(w, [p]) ) ) ,
w);
CROSSREFS
KEYWORD
nonn
AUTHOR
Gerhard Kirchner, Nov 20 2021
STATUS
approved