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.

Previous Showing 21-30 of 41 results. Next

A297411 Where the prime race among 12k+1, ..., 12k+11 changes leader.

Original entry on oeis.org

2, 17, 79, 101, 163, 197, 211, 263, 281, 379, 401, 443, 461, 479, 631, 677, 739, 809, 907, 953, 1087, 1109, 1171, 1193, 1543, 1607, 1721, 1759, 2063, 2203, 2417, 2543, 2633, 2711, 2731, 2753, 3203, 3221, 3323, 3607, 3803, 3847, 3863, 3943, 4397
Offset: 1

Views

Author

Sean A. Irvine, Dec 29 2017

Keywords

Crossrefs

A275939 Consider the prime race mod q (where q >= 2) between q*k+1 and q*k-1. Terms are numbers k where q*k+1 first takes lead over q*k-1.

Original entry on oeis.org

3, 608981813029, 26861, 11, 608981813017, 71, 192252423729713, 37, 11, 23
Offset: 2

Views

Author

Andy Martin, Aug 12 2016

Keywords

Comments

Values are available for all 2 <= q <= 999 except for 12 and 24. If q is odd and > 3 then 2*q will have the same value in the sequence as q.
Additional terms starting with q = 12 are:
unknown, 53, 71, 331, 17, 239, 37, 213827, 1381, 673, 23, 47, unknown, 101, 53, 379, 29, 59, 331
The longest q*k+1 versus q*k-1 races up to q = 999 are for q = 3,6,8,12,24 and 168. When q = 168 the race ends at prime 273084304417.
The mod 12 and 24 races were checked by computer to 1.1 * 10^14 without q*k+1 ever leading.
Kevin Ford (private communication) provides the following information on these races: "My paper with Richard Hudson contains a lot of information about the location of sign changes for pi(x,q,a)-pi(x,q,b). Corollary 4 has rigorous upper bounds, but these will likely not be useful to you. The information in Tables 2 and 3 will be more helpful, as these provide the most likely places to look for the first sign change. In the case of the mod 12 race, it is probably around exp(187.536), or about 2.79 x 10^{81}. For the mod 24 race, it's about exp(43.453)=7.437... x 10^{18}".

Examples

			For the fourth term q is 5. For primes 2,3,5 and 7 the mod 5 values are 2,3,0 and 2 respectively, so there is no change in the race. For the next prime 11, mod 5 gives 1, q*k+1 now leads 1 to 0, and the race is over.
		

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.
  • Paulo Ribenboim, The Little Book of Big Primes, Springer 1991

Crossrefs

Programs

  • C
    /*
    C language program used to investigate prime number races.
    Computes the first lead of qn+1 over qn-1 for q from 2 to 999.
    By Andy Martin oldadit@gmail.com 8/12/2016.
    Requires Kim Walisch's primesieve library from http://primesieve.org
    Iteration based on the primesieve_iterator.c example.
    */
    #include 
    #include 
    #include 
    #define UPDATE_COUNT 10000000000ull
    void race(uint64_t q)
    {
      uint64_t prime  = 0;
      uint64_t m1     = 0;
      uint64_t m_1    = 0;
      uint64_t rem    = 0;
      uint64_t update = UPDATE_COUNT;
      primesieve_iterator pi;
      primesieve_init(&pi);
      while (prime = primesieve_next_prime(&pi)) {
        if ((rem = prime % q) == 1){
          m1 += 1;
        } else if (rem == q-1) {
          m_1 += 1;
        }
        if (m1 > m_1){
          printf("Race mod %3llu ends at %12llu with %11llu pi(x;%llu,1) and %11llu pi(x;%llu,%llu)\n",
                 q, prime, m1, q, m_1, q, q-1);
          break;
        }
        /* Enable for update on long races where q = 3,6,8,12,24,168 */
        if (prime > update) {
          printf("  Race mod %llu ongoing at prime %llu with m1 %llu and m_1 %llu diff: %llu\n",
                 q, prime, m1, m_1, m_1 - m1);
          update += UPDATE_COUNT;
        }
      }
      primesieve_free_iterator(&pi);
    }
    int main()
    {
      uint64_t i;
      for(i=2; i<1000; i++){ race(i); }
      return(0);
    }

Extensions

a(8)-a(11) from Andy Martin, Aug 15 2016

A297447 Values of n for which pi_{8,5}(p_n) - pi_{8,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

30733704, 30733708, 30733714, 30733726, 30733729, 30733733, 30733743, 30733762, 30733764, 30733777, 30733781, 30733796, 30733853, 30733857, 30733860, 30733866, 30733880, 30733887, 30733890, 30734262
Offset: 1

Views

Author

Andrey S. Shchebetov and Sergei D. Shchebetov, Dec 30 2017

Keywords

Comments

This is a companion sequence to A297448. The first two sign-changing zones were discovered by Bays and Hudson back in 1979. We discovered four additional zones starting from a(22794) = 186422420112. The full sequence with all 6 zones checked up to 5*10^14 contains 664175 terms (see a-file) with a(664175) = 6097827689926 as its last term.
This sequence was checked up to 10^15 and the 7th sign-changing zone starting from a(664176) = 27830993289634 and ending with a(850232)= 27876113171315 was found. - Andrey S. Shchebetov and Sergei D. Shchebetov, Jul 28 2018
The y-coordinate of prime(a(n)) on the Cartesian grid defined in A379643 is -1. - Ya-Ping Lu, Jan 08 2025

Crossrefs

Programs

  • Python
    from sympy import nextprime; p, r1, r5 = 1, 0, 0
    for n in range(1, 30734263):
        p = nextprime(p); r = p%8
        if r == 1: r1 += 1
        elif r == 5: r5 += 1
    if r in {1, 5} and r1 == r5 + 1: print(n, end = ', ')  # Ya-Ping Lu, Jan 08 2025

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

Original entry on oeis.org

13, 29, 37, 53, 61, 71, 79, 101, 107, 113, 131, 139, 151, 163, 199, 359, 409, 421, 433, 443, 457, 479, 1223, 1231, 1249, 1277, 1283, 1291, 1301, 1307, 1399, 1423, 1439, 8699, 8779, 26821, 26951, 26959, 26987, 27011, 27031, 615731, 615869, 615887
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Comments

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:
3, 7, 19, 43, ....0th row
5, 11, 17, 23, 31, 41, 47, 59, 67, 103, 127, ....first row
13, 29, 37, 53, 61, 71, 79, 101, 107, 113 ....2nd row
73, 83, 97, 109, ....3rd row
89, ....4th row

Crossrefs

Programs

  • Maple
    c1:= 0; c3:= 0: p:= 2: count:= 0: Res:= NULL:
    while count < 100 do
      p:= nextprime(p);
      if c1 = c3 - 2 then
        count:= count+1;
        Res:= Res, p;
      fi;
      if p mod 4 = 1 then c1:=c1+1
      else c3:= c3+1
      fi
    od:
    Res; # Robert Israel, Nov 07 2018

Extensions

More terms from Joshua Zucker, May 03 2006

A295354 Primes p for which pi_{8,7}(p) - pi_{8,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

192252423729713, 192252423730849, 192252423731231, 192252423731633, 192252423731663, 192252423731839, 192252423732311, 192252423769201, 192252423769361, 192252423769537, 192252423772649, 192252423772807, 192252423772847, 192252423774023, 192252423774079, 192252423774457, 192252423779257, 192252423782521, 192252423783263, 192252423783551
Offset: 1

Views

Author

Andrey S. Shchebetov and Sergei D. Shchebetov, Nov 20 2017

Keywords

Comments

This sequence is a companion sequence to A295353. The sequence with the first found pi_{8,7}(p_n) - pi_{8,1}(p_n) sign-changing zone contains 234937 terms (see a-file) with a(237937) = 192876135747311 as its last term. In addition, a(1) = A275939(8).

Crossrefs

A382091 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) shares a factor with a(n-1) while the total number of prime terms of the form 4*k + 1 is never less than those of the form 4*k + 3.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 5, 15, 3, 9, 12, 14, 16, 18, 20, 22, 24, 21, 27, 30, 25, 35, 28, 26, 13, 39, 33, 11, 44, 32, 34, 17, 51, 36, 38, 19, 57, 42, 40, 45, 48, 46, 50, 52, 54, 56, 49, 63, 60, 55, 65, 70, 58, 29, 87, 66, 62, 31, 93, 69, 72, 64, 68, 74, 37, 111
Offset: 1

Views

Author

Scott R. Shannon, Mar 15 2025

Keywords

Comments

Unlike the EKG sequence A064413 the primes do not occur in their natural order, and the terms proceeding and following a prime can be more than two and three times respectively the value of the prime term. In the first 100000 terms the largest ratio found is a(75) = 84, a(76) = 7, with 84/7 = 12.
Like the EKG sequence the terms are predominantly concentrated along three lines, but with the addition of at least four more sparsely populated lines; see the attached image.
In the first 100000 terms the fixed points are 1, 2, 77, 121; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.
Note that if the prime form selection rule is reversed so that the total number of primes of the form 4*k + 1 is never more than those of the form 4*k + 3 then the sequence will match the EKG sequence for the first 52082 terms, beyond which a(52083) = 53724 while for the EKG sequence a(52083) = 26861, this later value being the first prime where the prime-race leader changes; see A007350.

Examples

			a(5) = 8 as a(4) = 6 and 8 is unused and shares a factor with 6. Note that 3 cannot be chosen as 3 is of the form 4*k + 3, and no primes of form 4*k + 1 have yet occurred. This is the first term to differ from A064413.
a(7) = 5 as a(6) = 10 and 5 is unused and shares a factor with 10. This is the first prime of the form 4*k + 1 to occur.
a(9) = 3 as a(8) = 15 and 3 is unused and shares a factor with 15. As a prime of the form 4*k + 1 has occurred, one of the form 4*k + 3 is now allowed.
		

Crossrefs

A093180 Odd composites (including 1 in the count) where the number 1 mod 4 equals the number 3 mod 4.

Original entry on oeis.org

26829, 26845, 26853, 26857, 26865, 26869, 26873, 26877, 26885, 26889, 26897, 26917, 616765, 616773, 616777, 616785, 616825, 616833, 616837, 616845, 616853, 616857, 616861, 616865, 616869, 616873, 616881, 616885, 616889, 616893, 617013
Offset: 1

Views

Author

Enoch Haga, Mar 27 2004

Keywords

Comments

This odd composite race seems analogous to the prime number race

Examples

			a(1)=26829 is the first odd composite 1 mod 4 where the count 5238 is the same for 26835 3 mod 4
		

Crossrefs

Formula

Beginning with 1, run separate counts for odd composites 1 mod 4 and 3 mod 4. When the count is equal, record the number for 1 mod 4.

A093181 Odd composites (including 1 in the count) where the number 3 mod 4 equals the number 1 mod 4.

Original entry on oeis.org

26835, 26851, 26855, 26859, 26867, 26871, 26875, 26883, 26887, 26895, 26899, 26923, 616771, 616775, 616779, 616795, 616831, 616835, 616839, 616847, 616851, 616855, 616859, 616863, 616867, 616875, 616879, 616883, 616887, 616891, 617007
Offset: 1

Views

Author

Enoch Haga, Mar 27 2004

Keywords

Comments

This odd composite race seems analogous to the prime number race

Examples

			a(1)=26835 is the first odd composite 3 mod 4 where the count 5238 is the same for 26829 1 mod 4
		

Crossrefs

Formula

Beginning with 1, run separate counts for odd composites 1 mod 4 and 3 mod 4. When the count is equal, record the number for 3 mod 4.

A093182 Counts where both the odd composites (starting from 1) 1 mod 4 and 3 mod 4 are equal.

Original entry on oeis.org

5238, 5241, 5242, 5243, 5244, 5245, 5246, 5247, 5248, 5249, 5250, 5255, 129008, 129009, 129010, 129012, 129020, 129021, 129022, 129023, 129024, 129025, 129026, 129027, 129028, 129029, 129030, 129031, 129032, 129033, 129058, 129059, 129060
Offset: 1

Views

Author

Enoch Haga, Mar 27 2004

Keywords

Examples

			At 26829 1 mod 4 and 26835 3 mod 4, the count of odd composites is equal for each run at 5238; so a(1)=5238. [Compare to the prime 26833 1 mod 4 where equality occurs at count 1471 and the first reversal in the race occurs at 26861.]
		

Crossrefs

Formula

Run separate counts of odd composites 1 mod 4 and 3 mod 4. When the count is equal, record the count.

A216057 a(n) = A045429(n) - A045356(n).

Original entry on oeis.org

1, 6, 6, 6, 12, 12, 6, 6, 2, 4, -6, -6, 4, -4, 4, 4, 14, 24, 24, 24, 24, 14, 14, 24, 6, 12, 12, 6, 2, 4, -24, -24, -26, -34, -18, -6, 6, 4, 12, 24, 22, 14, 4, 12, 6, 24, 24, 34, 24, 32, 16, 14, 24, 24, 26, 32, 34, 26, 34, 14, 14, 6, -18, -18, 6, 4, -6, -8, -14
Offset: 1

Views

Author

Zak Seidov, Aug 31 2012

Keywords

Crossrefs

Previous Showing 21-30 of 41 results. Next