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.

A038691 Indices of primes at which the prime race 4k-1 vs. 4k+1 is tied.

Original entry on oeis.org

1, 3, 7, 13, 89, 2943, 2945, 2947, 2949, 2951, 2953, 50371, 50375, 50377, 50379, 50381, 50393, 50413, 50423, 50425, 50427, 50429, 50431, 50433, 50435, 50437, 50439, 50445, 50449, 50451, 50503, 50507, 50515, 50517, 50821, 50843, 50853, 50855, 50857, 50859, 50861
Offset: 1

Views

Author

Keywords

Comments

Starting from a(27410) = 316064952537 the sequence includes the 8th sign-changing zone predicted by C. Bays et al back in 2001. The sequence with the first 8 sign-changing zones contains 419467 terms (see a-file) with a(419467) = 330797040309 as its last term. - Sergei D. Shchebetov, Oct 16 2017

Examples

			From _Jon E. Schoenfield_, Jul 24 2021: (Start)
a(n) is the n-th number m at which the prime race 4k-1 vs. 4k+1 is tied:
.
                             count
                           ----------
   m  p=prime(m)  p mod 4  4k-1  4k+1
  --  ----------  -------  ----  ----
   1       2         2       0  =  0    a(1)=1
   2       3        -1       1     0
   3       5        +1       1  =  1    a(2)=3
   4       7        -1       2     1
   5      11        -1       3     1
   6      13        +1       3     2
   7      17        +1       3  =  3    a(3)=7
   8      19        -1       4     3
   9      23        -1       5     3
  10      29        +1       5     4
  11      31        -1       6     4
  12      37        +1       6     5
  13      41        +1       6  =  6    a(4)=13
(End)
		

References

  • Stan Wagon, The Power of Visualization, Front Range Press, 1994, pp. 2-3.

Crossrefs

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

Programs

  • Mathematica
    Flatten[ Position[ FoldList[ Plus, 0, Mod[ Prime[ Range[ 2, 50900 ] ], 4 ]-2 ], 0 ] ]
  • PARI
    lista(nn) = {nbp = 0; nbm = 0; forprime(p=2, nn, if (((p-1) % 4) == 0, nbp++, if (((p+1) % 4) == 0, nbm++)); if (nbm == nbp, print1(primepi(p), ", ")););} \\ Michel Marcus, Nov 20 2016