login
a(n)=x is the least prime with pi(x,4,3) - pi(x,4,1) = n-1 where pi(x,4,k) is the number of primes 4*j + k <= x.
2

%I #19 Dec 14 2021 22:54:15

%S 2,3,11,71,83,223,227,503,751,1531,1543,1571,1579,1583,4127,5147,5171,

%T 5179,5651,6211,11083,11087,11471,11483,11519,11527,11579,11587,17239,

%U 17551,17903,17971,35963,36011,39703,39727

%N a(n)=x is the least prime with pi(x,4,3) - pi(x,4,1) = n-1 where pi(x,4,k) is the number of primes 4*j + k <= x.

%C 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.

%H Gerhard Kirchner, <a href="/A349518/a349518.pdf">Oscillations of d(x)</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeQuadraticEffect.html">Prime Quadratic Effect.</a>

%e primes 4*j+1: 5, 13, 17, ...

%e 4*j+3: 3, 7, 11, ...

%e d(x) = pi(x,4,3) - pi(x,4,1)

%e .

%e n x pi(x,4,3) pi(x,4,1) d(x)=n-1?

%e - -- --------- --------- ---------

%e 1 2 0 0 0=0 true a(1) = 2

%e 2 3 1 0 1=1 true a(2) = 3

%e 3 5 1 1 0=2 false a(3) != 5

%e ...........................

%e 3 11 3 1 2=2 true a(3) = 11

%o (Maxima) block(w:[2], su:0, sum:0, n:1, p:2, nmax: 40,

%o /* returns nmax terms */

%o while n<nmax do(

%o p: next_prime(p), su:su+mod(p,4)-2,

%o if su>sum then(n:n+1, sum:su, w: append(w,[p]) ) ) ,

%o w);

%Y Cf. A038691, A007350.

%K nonn

%O 1,1

%A _Gerhard Kirchner_, Nov 20 2021