cp's OEIS Frontend

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.

A051024 Values of n for which pi_{4,3}(p_n) - pi_{4,1}(p_n) = -1, where p_n is the n-th prime and pi_{m,a}(x) is the number of primes <= x which are congruent to a (mod m).

Original entry on oeis.org

2946, 50378, 50380, 50382, 50392, 50414, 50418, 50420, 50422, 50424, 50426, 50428, 50430, 50436, 50438, 50446, 50448, 50450, 50822, 50832, 50834, 50842, 50844, 50852, 50854, 50856, 50858, 50862, 50864, 50866, 50872, 50892, 50902
Offset: 1

Views

Author

Keywords

Comments

This is a companion sequence to A051025.
Starting from a(27556) = 316064952540 the sequence includes the 8th sign-changing zone predicted by C. Bays et al. The sequence with the first 8 sign-changing zones contains 418933 terms (see a-file) with a(418933) = 330797040308 as its last term. - Sergei D. Shchebetov, Oct 06 2017
We also discovered the 9th sign-changing zone, which starts from 2083576475506, ends with 2083615410040, and has 13370 terms with pi_{4,3}(p) - pi_{4,1}(p) = -1. This zone is considerably lower than predicted by M. Deléglise et al. in 2004. - Andrey S. Shchebetov and Sergei D. Shchebetov, Dec 30 2017
We also discovered the 10th sign-changing zone, which starts from 21576098946648, ends with 22056324317296, and has 481194 terms with pi_{4,3}(p) - pi_{4,1}(p) = -1. This zone is considerably lower than predicted by M. Deléglise et al. in 2004. - Andrey S. Shchebetov and Sergei D. Shchebetov, Jan 28 2018

Crossrefs

Cf. A156749 (Sequence showing Chebyshev bias in prime races (mod 4)). - Daniel Forgues, Mar 26 2009

Programs

  • Mathematica
    For[i=2; d=0, True, i++, d+=Mod[Prime[i], 4]-2; If[d==-1, Print[i]]]
    (* Second program: *)
    Position[Accumulate@ Array[Mod[Prime@ #, 4] - 2 &, 51000], -1][[All, 1]] (* Michael De Vlieger, Dec 30 2017 *)
  • Python
    from sympy import nextprime; a, p = 0, 2
    for n in range(2, 50917):
        p=nextprime(p); a += p%4-2
        if a == -1: print(n, end = ', ') # Ya-Ping Lu, Jan 18 2025

Extensions

Edited by Dean Hickerson, Mar 05 2002