This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A349518 #20 Feb 16 2025 08:34:02 %S A349518 2,3,11,71,83,223,227,503,751,1531,1543,1571,1579,1583,4127,5147,5171, %T A349518 5179,5651,6211,11083,11087,11471,11483,11519,11527,11579,11587,17239, %U A349518 17551,17903,17971,35963,36011,39703,39727 %N A349518 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 A349518 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 A349518 Gerhard Kirchner, <a href="/A349518/a349518.pdf">Oscillations of d(x)</a> %H A349518 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeQuadraticEffect.html">Prime Quadratic Effect.</a> %e A349518 primes 4*j+1: 5, 13, 17, ... %e A349518 4*j+3: 3, 7, 11, ... %e A349518 d(x) = pi(x,4,3) - pi(x,4,1) %e A349518 . %e A349518 n x pi(x,4,3) pi(x,4,1) d(x)=n-1? %e A349518 - -- --------- --------- --------- %e A349518 1 2 0 0 0=0 true a(1) = 2 %e A349518 2 3 1 0 1=1 true a(2) = 3 %e A349518 3 5 1 1 0=2 false a(3) != 5 %e A349518 ........................... %e A349518 3 11 3 1 2=2 true a(3) = 11 %o A349518 (Maxima) block(w:[2], su:0, sum:0, n:1, p:2, nmax: 40, %o A349518 /* returns nmax terms */ %o A349518 while n<nmax do( %o A349518 p: next_prime(p), su:su+mod(p,4)-2, %o A349518 if su>sum then(n:n+1, sum:su, w: append(w,[p]) ) ) , %o A349518 w); %Y A349518 Cf. A038691, A007350. %K A349518 nonn %O A349518 1,1 %A A349518 _Gerhard Kirchner_, Nov 20 2021