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.

Showing 1-10 of 17 results. Next

A007350 Where the prime race 4k-1 vs. 4k+1 changes leader.

Original entry on oeis.org

3, 26861, 26879, 616841, 617039, 617269, 617471, 617521, 617587, 617689, 617723, 622813, 623387, 623401, 623851, 623933, 624031, 624097, 624191, 624241, 624259, 626929, 626963, 627353, 627391, 627449, 627511, 627733, 627919, 628013, 628427, 628937, 629371
Offset: 1

Views

Author

Keywords

Comments

The following references include some on the "prime race" question that are not necessarily related to this particular sequence. - N. J. A. Sloane, May 22 2006
Starting from a(12502) = A051025(27556) = 9103362505801, the sequence includes the 8th sign-changing zone predicted by C. Bays et al. The sequence with the first 8 sign-changing zones contains 194367 terms (see a-file) with a(194367) = 9543313015387 as its last term. - Sergei D. Shchebetov, Oct 13 2017

References

  • Ford, Kevin; Konyagin, Sergei; Chebyshev's conjecture and the prime number race. IV International Conference "Modern Problems of Number Theory and its Applications": Current Problems, Part II (Russian) (Tula, 2001), 67-91.
  • Granville, Andrew; Martin, Greg; Prime number races. (Spanish) With appendices by Giuliana Davidoff and Michael Guy. Gac. R. Soc. Mat. Esp. 8 (2005), no. 1, 197-240.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

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

Programs

  • Mathematica
    lim = 10^5; k1 = 0; k3 = 0; t = Table[{p = Prime[k], If[Mod[p, 4] == 1, ++k1, k1], If[Mod[p, 4] == 3, ++k3, k3]}, {k, 2, lim}]; A007350 = {3}; Do[ If[t[[k-1, 2]] < t[[k-1, 3]] && t[[k, 2]] == t[[k, 3]] && t[[k+1, 2]] > t[[k+1, 3]] || t[[k-1, 2]] > t[[k-1, 3]] && t[[k, 2]] == t[[k, 3]] && t[[k+1, 2]] < t[[k+1, 3]], AppendTo[A007350, t[[k+1, 1]]]], {k, 2, Length[t]-1}]; A007350 (* Jean-François Alcover, Sep 07 2011 *)
    lim = 10^5; k1 = 0; k3 = 0; p = 2; t = {}; parity = Mod[p, 4]; Do[p = NextPrime[p]; If[Mod[p, 4] == 1, k1++, k3++]; If[(k1 - k3)*(parity - Mod[p, 4]) > 0, AppendTo[t, p]; parity = Mod[p, 4]], {lim}]; t (* T. D. Noe, Sep 07 2011 *)

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

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

A096448 Primes p such that the number of primes less than p equal to 1 mod 4 is one less than the number of primes less than p equal to 3 mod 4.

Original entry on oeis.org

5, 11, 17, 23, 31, 41, 47, 59, 67, 103, 127, 419, 431, 439, 461, 467, 1259, 1279, 1303, 26833, 26849, 26881, 26893, 26921, 26947, 615883, 616769, 616787, 616793, 616829, 617051, 617059, 617087, 617257, 617473, 617509, 617647, 617681, 617731, 617819, 617879
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Examples

			First term prime(2) = 3 is placed on 0th row.
If prime(n-1) = +1 mod 4 is on k-th row then we put prime(n) on (k-1)-st row.
If prime(n-1) = -1 mod 4 is on k-th row then we put prime(n) on (k+1)-st row.
This process makes an array of prime numbers:
  0th row:  3,  7, 19,  43, ...
  1st row:  5, 11, 17,  23, 31, 41, 47, 59, 67, 103, 127, ...
  2nd row: 13, 29, 37,  53, 61, 71, 79, 101, 107, 113 ...
  3rd row: 73, 83, 97, 109, ...
  4th row: 89, ...
		

Crossrefs

Programs

  • Mathematica
    Prime[#]&/@(Flatten[Position[Accumulate[If[Mod[#,4]==1,1,-1]&/@ Prime[ Range[ 2,51000]]],-1]]+2) (* Harvey P. Dale, Mar 08 2015 *)
  • PARI
    lista(nn) = my(vp=primes(nn), nb1=0, nb3=0); for (i=2, #vp, my(p = vp[i]); if (nb1 == nb3-1, print1(p, ", ")); if ((p % 4) == 1, nb1++, nb3++);); \\ Michel Marcus, May 30 2024

Extensions

More terms from Joshua Zucker, May 03 2006

A051025 Primes p for which pi_{4,3}(p) - pi_{4,1}(p) = -1, where pi_{m,a}(x) is the number of primes <= x which are congruent to a (mod m).

Original entry on oeis.org

26861, 616841, 616849, 616877, 617011, 617269, 617327, 617339, 617359, 617369, 617401, 617429, 617453, 617521, 617537, 617689, 617699, 617717, 622813, 622987, 623003, 623107, 623209, 623299, 623321, 623341, 623353, 623401, 623423, 623437
Offset: 1

Views

Author

Keywords

Comments

This is a companion sequence to A051024.
Starting from a(27556)=9103362505801 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)=9543313015309 as its last term. - Sergei D. Shchebetov, Oct 06 2017
We also discovered the 9th sign-changing zone, which starts from 64083080712569, ends with 64084318523021, 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 715725135905981, ends with 732156384107921, 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[p=Prime[i], 4]-2; If[d==-1, Print[p]]]
    (* Second program: *)
    Prime@ 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
    while p < 623803:
        p=nextprime(p); a += p%4-2
        if a == -1: print(p, end = ', ')  # Ya-Ping Lu, Jan 18 2025

Extensions

Edited by Dean Hickerson, Mar 10 2002

A096455 Primes p such that the number of primes q, 7 <= q < p, congruent to 1 or 2 mod 5, is two more than the number of such primes congruent to 3 or 4 mod 5.

Original entry on oeis.org

13, 19, 43, 53, 71, 79, 139, 163, 173, 193, 199, 223, 229, 263, 281, 293, 311, 317, 383, 409, 433, 593, 613, 619, 641, 647, 659, 673, 683, 701, 719, 733, 769, 809, 821, 827, 839, 911, 929, 941, 1151, 1163, 1181, 1231, 1277, 1283, 1301, 1307, 1321, 1439, 1451
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Prime[#+4]&/@Flatten[Position[Accumulate[Table[Which[Mod[n,5] == 1,1,Mod[ n,5] == 2,1,Mod[ n,5] == 3,-1,Mod[n,5]==4,-1],{n,Prime[ Range[ 4,250]]}]],2]] (* Harvey P. Dale, Aug 29 2021 *)

Extensions

More terms and better definition from Joshua Zucker, May 21 2006

A108547 Fixed points for prime number permutation A108546.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 41, 43, 461, 463, 26833, 26839, 26849, 26879, 26881, 26891, 26893, 26903, 26921, 26927, 616769, 616783, 616793, 616799, 616829, 617039, 617257, 617471, 617473, 617479, 617509, 617587, 617681, 617723, 618437, 618439, 618521
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2005

Keywords

Comments

Primes p such that A108546(A049084(p)) = p.

Crossrefs

Programs

  • PARI
    default(primelimit,10^8); s = 0; print1(2, ", "); forprime (p = 3, 10^8, if (p%4 == 3, s++; if (s == 1, print1(p, ", ")), s--; if (s == 0, print1(p, ", ")))); \\ David Wasserman, May 19 2008

Extensions

Corrected by T. D. Noe, Oct 25 2006
More terms from David Wasserman, May 19 2008

A096452 Primes p such that the number of primes q, 5 <= q < p, congruent to 1 mod 3, is one less than the number of such primes congruent to 2 mod 3.

Original entry on oeis.org

7, 13, 19, 29, 37, 43, 53, 71, 79, 89, 101, 107, 113, 131, 163, 173, 223, 229, 239, 251, 383, 443, 1811, 1871, 1877, 1889, 608981812613, 608981812667, 608981812891, 608981812951, 608981812993, 608981813929, 608981813941, 608981814019, 608981814173
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {}; p = q = 0; r = 5; While[r < 10^5, If[ Mod[r, 3] == 2, p++, q++ ]; r = NextPrime@ r; If[p == q + 1, AppendTo[lst, r]; Print@ r]]; lst (* Robert G. Wilson v, Sep 20 2009 *)

Extensions

More terms and better definition from Joshua Zucker, May 21 2006
Terms a(27) onward from Max Alekseyev, Feb 10 2011

A096453 Primes p such that the number of primes q, 5 <= q < p, congruent to 1 mod 3, is two less than the number of such primes congruent to 2 mod 3.

Original entry on oeis.org

31, 59, 67, 73, 97, 103, 109, 127, 137, 149, 157, 179, 191, 197, 211, 241, 257, 347, 353, 379, 389, 401, 419, 431, 439, 449, 461, 467, 761, 773, 797, 1787, 1801, 1823, 1847, 1867, 1873, 1879, 1901, 3761, 9203, 198479, 198593, 608981812531, 608981812651, 608981812697
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Crossrefs

Programs

Extensions

More terms and better definition from Joshua Zucker, May 21 2006
a(44) onwards from Andrew Howroyd, Aug 09 2025

A096454 Primes p such that the number of primes q, 7 <= q < p, congruent to 1 or 2 mod 5, is one more than the number of such primes congruent to 3 or 4 mod 5.

Original entry on oeis.org

11, 17, 23, 41, 47, 59, 67, 83, 103, 109, 137, 149, 157, 167, 179, 191, 197, 211, 227, 233, 257, 269, 277, 307, 389, 401, 419, 431, 439, 499, 563, 587, 599, 607, 617, 631, 661, 677, 691, 727, 739, 761, 773, 797, 811, 853, 859, 883, 907, 937, 1171, 1289, 1297
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Crossrefs

Extensions

More terms and better definition from Joshua Zucker, May 21 2006
Showing 1-10 of 17 results. Next