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 31-40 of 41 results. Next

A295353 Values of n for which pi_{8,7}(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

6035005477560, 6035005477596, 6035005477608, 6035005477618, 6035005477620, 6035005477623, 6035005477632, 6035005478719, 6035005478725, 6035005478730, 6035005478822, 6035005478826, 6035005478829, 6035005478863, 6035005478866, 6035005478874, 6035005479026, 6035005479132, 6035005479158, 6035005479163
Offset: 1

Views

Author

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

Keywords

Comments

This sequence is a companion sequence to A295354. 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) = 6053968231350 as its last term.

Crossrefs

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

862062606318, 862062606330, 862062606348, 862062606351, 862062606377, 862062606380, 862062606387, 862062606393, 862062606424, 862062606448, 862062606453, 862062606466, 862062606469, 862062606478, 862062606481, 862062606488, 862062606490, 862062606494, 862062606496, 862062606500
Offset: 1

Views

Author

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

Keywords

Comments

This is a companion sequence to A297355 and includes values of n for the first discovered sign-changing zone for pi_{12,5}(p) - pi_{12,1}(p) prime race. The full sequence checked up to 10^14 has 8399 terms (see b-file).

Crossrefs

A297355 Primes p for which pi_{12,5}(p) - pi_{12,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

25726067172577, 25726067172857, 25726067173321, 25726067173441, 25726067174389, 25726067174461, 25726067174653, 25726067174761, 25726067175961, 25726067176549, 25726067176669, 25726067176993, 25726067177149, 25726067177429, 25726067177449, 25726067177593, 25726067177617, 25726067177689, 25726067177801, 25726067178013
Offset: 1

Views

Author

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

Keywords

Comments

This is a companion sequence to A297354 and includes the first discovered sign-changing zone for pi_{12,5}(p) - pi_{12,1}(p) prime race. The full sequence checked up to 10^14 has 8399 terms (see b-file).

Crossrefs

A329224 a(n) is the smallest prime q such that Sum_{primes r <= q} Kronecker(r,prime(n)) > 0 (or equivalently, Sum_{primes r <= q} Kronecker(r,prime(n)) = 1), or 0 if no such prime exists.

Original entry on oeis.org

11100143, 608981813029, 2082927221, 2, 5, 2083, 2, 11, 2, 719, 2, 11, 2, 53, 2, 17, 5, 5, 163, 2, 2, 2, 11, 2, 2, 23, 2, 23, 5, 2, 2, 5, 2, 11, 31, 2, 17, 15073, 2, 47, 5, 5, 2, 2, 47, 2, 59, 2, 11, 5, 2, 2, 2, 5, 2, 2, 47, 2, 23, 2, 97, 349, 103, 2, 2, 67, 149, 2, 67
Offset: 1

Views

Author

Jianing Song, Nov 08 2019

Keywords

Comments

In general, assuming the strong form of the Riemann Hypothesis, if 0 < a, b < k, gcd(a, k) = gcd(b, k) = 1, a is a quadratic residue and b is a quadratic nonresidue mod k, then Pi(k,b)(n) > Pi(k,a)(n) occurs more often than not, where Pi(k,b)(n) is the number of primes <= n that are congruent to b modulo k. This phenomenon is called "Chebyshev's bias". (See Wikipedia link and especially the links in A007350.) [Edited by Peter Munn, Jun 26 2025]
This sequence gives the smallest primes q to violate the inequality Sum_{primes r <= q} Kronecker(r,p) <= 0, for p = prime(n).

Examples

			For prime(6) = 13, q = 2083 is the first case such that Sum_{primes r <= q} Kronecker(r,13) = 1 > 0, so a(6) = 2083.
		

Crossrefs

Cf. A007350, A306499, A306500, A329225 (indices of these primes).

Programs

  • PARI
    a(n) = if(n==2, 608981813029, if(n==3, 2082927221, my(p=prime(n), i=0); forprime(q=2, oo, i+=kronecker(q, p); if(i>0, return(q)))))

A329242 a(n) = Pi(8,3)(n) + Pi(8,5)(n) + Pi(8,7)(n) - 3*Pi(8,1)(n), where Pi(a,b)(x) denotes the number of primes in the arithmetic progression a*k + b less than or equal to x.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Jianing Song, Nov 08 2019

Keywords

Comments

In general, assuming the strong form of the Riemann Hypothesis, if 0 < a, b < k are integers, gcd(a, k) = gcd(b, k) = 1, a is a quadratic residue and b is a quadratic nonresidue mod k, then Pi(k,b)(n) > Pi(k,a)(n) occurs more often than not. This phenomenon is called "Chebyshev's bias". (See Wikipedia link and especially the links in A007350.) [Edited by Peter Munn, Nov 19 2023]
Define the "Chebyshev's bias sequence mod k" to be sequence q(n), where q(n) = Sum_{b is a quadratic nonresidue mod k, gcd(b, k) = 1} Pi(k,b)(n) - (r-1)*(Sum_{a is a quadratic residue mod k, gcd(a, k) = 1} Pi(k,a)(n)), r is the number of solutions to x^2 == 1 (mod n), then this sequence is the "Chebyshev's bias sequence mod 8". Also the initial terms are nonnegative integers, a(n) is negative for some n ~ 10^28.127. See page 21 of the paper in Journal of Number Theory in the Links section below.

Examples

			Below 2000000, there are 37116 primes congruent to 1 mod 8, 37261 primes congruent to 3 mod 8, 37300 primes congruent to 5 mod 8 and 37255 primes congruent to 7 mod 8, so a(2000000) = 37261 + 37300 + 37255 - 3*37116 = 468.
		

Crossrefs

"Chebyshev's bias sequence mod k": A112632 (k=3), A038698 (k=4), A321862 (k=5), A321864 (k=7), A321865 (k=11).

Programs

  • PARI
    a(n) = my(k=0); for(p=1, n, if(isprime(p)&&p>2, if(p%8==1, k-=3, k++))); k

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.

Original entry on oeis.org

2, 3, 11, 71, 83, 223, 227, 503, 751, 1531, 1543, 1571, 1579, 1583, 4127, 5147, 5171, 5179, 5651, 6211, 11083, 11087, 11471, 11483, 11519, 11527, 11579, 11587, 17239, 17551, 17903, 17971, 35963, 36011, 39703, 39727
Offset: 1

Views

Author

Gerhard Kirchner, Nov 20 2021

Keywords

Comments

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.

Examples

			primes 4*j+1: 5, 13, 17, ...
       4*j+3: 3, 7, 11, ...
d(x) = pi(x,4,3) - pi(x,4,1)
.
  n  x  pi(x,4,3) pi(x,4,1)  d(x)=n-1?
  - --  --------- ---------  ---------
  1  2       0         0     0=0  true   a(1)  = 2
  2  3       1         0     1=1  true   a(2)  = 3
  3  5       1         1     0=2 false   a(3) != 5
  ...........................
  3 11       3         1     2=2  true   a(3)  = 11
		

Crossrefs

Programs

  • Maxima
    block(w:[2],  su:0, sum:0, n:1, p:2, nmax: 40,
      /* returns nmax terms */
    while nsum then(n:n+1, sum:su, w: append(w,[p]) ) ) ,
    w);

A381902 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 factors, counted with multiplicity, of the form 4*k+1 and 4*k+3 for all terms a(1)..a(n) never differs by more than 1.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 5, 15, 3, 12, 16, 20, 14, 26, 13, 39, 9, 30, 25, 35, 7, 28, 32, 34, 17, 51, 18, 40, 22, 50, 24, 38, 52, 44, 55, 60, 58, 29, 87, 21, 70, 64, 68, 46, 74, 37, 111, 33, 75, 45, 65, 78, 36, 80, 48, 82, 41, 123, 42, 91, 104, 56, 100, 62, 31
Offset: 1

Views

Author

Scott R. Shannon, Mar 09 2025

Keywords

Comments

Unlike the EKG sequence A064413 the prime terms are not in their natural order, and the terms preceding and following such terms can be large multiples of the prime. The terms overall are distributed over multiple lines, with the primes falling on at least two lines; see the attached colored image. Due to the term selection rules numbers which have a sum of prime factor exponents for prime factors of the form 4*k+1 and 4*k+3 which differ by 3 or more can never appear, the smallest such number being 27.
In the first 100000 terms the fixed points are 1, 2, 88, 118, 304, 786, 826. It is likely no more exist.
There are five dominant lines on the graph of the first 100000 terms. They can be characterized as follows, from the highest sloped L1 to the lowest sloped L5, considering terms within 1% of the fitted equations. The approximate slopes of the five lines are 2.1284, 1.476, 1.4190, 1.06845, and 0.70947, so that the normalized slopes of L1, L3, L4 and L5 are 3, 2, 3/2 and 1. L5 has essentially has only prime terms, while the others essentially have none. The 5 lines encompass approx. 97% of terms in the range 50K-100K. - Bill McEachen, Aug 21 2025

Examples

			a(5) = 8 as the total number of prime factors of the form 4*k+1 and 4*k+3 for the first four terms is 0 and 1 respectively, thus a(5) cannot contain a single prime factor of the form 4*k+3. This eliminates 3 as a candidate, leaving 8 as the smallest available number that has no such prime factors and shares a factor with a(4) = 6. This is the first term to differ from A064413.
a(7) = 5 as the total number of prime factors of the form 4*k+1 and 4*k+3 for the first six terms is 1 and 1 respectively, thus a term can be chosen that contains a single odd prime factor, and 5 is the smallest unused term that shares a factor with a(6) = 10.
		

Crossrefs

A118480 (n-th 4k+1 prime minus n-th 4k+3 prime minus two)/4.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 2, 3, 3, 5, 6, 5, 6, 2, 7, 5, 6, 8, 7, 7, 7, 12, 10, 10, 11, 11, 12, 10, 10, 12, 11, 13, 10, 10, 10, 10, 9, 8, 7, 9, 3, 4, 4, 4, 11, 13, 15, 17, 19, 19, 22, 19, 16, 13, 17, 16, 15, 16, 14, 17, 16, 21, 24, 19, 19, 13, 17, 17, 19, 19, 16, 11, 13, 13, 22, 19, 19, 17, 22
Offset: 1

Views

Author

Keywords

Comments

Zero occurs infinitely often as do the negative numbers.
First occurrence of a(n) beginning with 0: 1, 2, 4, 5, 42, 10, 11, 15, 18, 37, 23, 25, 22, 32, 59, 47, 53, 48, 83, 49, 110, 62, 51, 82, 63, 170, ...,
The first negative term is at n=1473. - T. D. Noe, Apr 09 2009

Crossrefs

Programs

  • Mathematica
    (Select[1 + 4Range@245, PrimeQ@# &] - Select[ -1 + 4Range@225, PrimeQ@# &] - 2)/4

Formula

a(n) = (A002144(n) - A002145(n) - 2)/4.

A267135 a(n) = n minus the number of primes of form 4m + 1 that are less than n-th prime of form 4m + 3.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 3, 3, 4, 2, 3, 2, 3, 3, 3, 3, 4, 4, 4, 3, 4, 5, 6, 5, 5, 5, 5, 4, 4, 5, 4, 4, 3, 4, 4, 5, 2, 2, 2, 3, 1, 2, 3, 4, 5, 6, 7, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 7, 7, 5, 6, 5, 6, 6, 7, 8, 5, 4, 4, 5, 5, 4, 5, 4, 5, 6, 7, 8, 6, 6, 7, 7, 8, 6, 6, 6, 6, 6, 6, 7, 6, 5, 5, 5, 6, 6
Offset: 1

Views

Author

Gionata Neri, Jan 10 2016

Keywords

Comments

a(25191) = -3 is the first negative term. - Robert Israel, Jan 12 2016

Crossrefs

Programs

  • Maple
    N:= 10000: # to use primes up to N P1:= select(isprime, [seq(i,i=1..N,4)]):
    P3:= select(isprime, [seq(i,i=3..N,4)]):
    V:= Vector(N):
    for n from 2 to nops(P1) do
      V[P1[n-1]..P1[n]-1]:=n-1
    od:
    V[P1[nops(P1)]..N]:= nops(P1);
    seq(n - V[P3[n]],n=1..nops(P3)); # Robert Israel, Jan 11 2016
  • Mathematica
    nn = 10000;
    P1 = Select[Range[1, nn, 4], PrimeQ];
    P3 = Select[Range[3, nn, 4], PrimeQ];
    V = Table[0, nn];
    For[n = 2, n <= Length[P1], n++,
      V[[P1[[n-1]] ;; P1[[n]]-1]] = n-1
    ];
    V[[P1[[Length[P1]]] ;; nn]] = Length[P1];
    Table[n - V[[P3[[n]]]], {n, 1, Length[P3]}] (* Jean-François Alcover, Sep 18 2018, after Robert Israel *)

A349519 a(n)=x is the least prime with pi(x,4,3) - pi(x,4,1) = 1-n where pi(x,4,k) is the number of primes 4*j + k <= x.

Original entry on oeis.org

2, 26861, 616897, 616909, 616933, 623641, 623653, 623669, 623681, 12315529, 12315581, 12315613, 12315617, 12362653, 12362657, 12362717, 12362741, 12362981, 12362989, 12365033, 12365057, 12365153, 12365173, 12365201, 12366589, 951821281
Offset: 1

Views

Author

Gerhard Kirchner, Nov 20 2021

Keywords

Comments

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 A349518, "Oscillations of d(x)". If d(x) has no lower limit, the current sequence is infinite. Regarding the upper limit, see A349518.
Note the gaps between 2, 26861 and 616897, 623681 and 12315529, 12366589 and 951821281.

Examples

			primes 4*j+1: 5, 13, 17, ...
       4*j+3: 3, 7, 11, ...
d(x) = pi(x,4,3) - pi(x,4,1)
.
  n     x  pi(x,4,3) pi(x,4,1)   d(x)=1-n?
  - -----  --------- ---------  -----------
  1     2       0         0      0=0  true   a(1)  = 2
  2     3       1         0      1=-1 false  a(2) != 3
  2     5       1         1      2=-1 false  a(2) != 5
  ...........................
  2 26861    1472      1473     -1=-1 true   a(3)  = 26861
		

Crossrefs

Programs

  • Maxima
    block(w:[2],  su:0, sum:0, n:1, p:2, nmax: 25,
      /* returns nmax terms */
    while n
    				
Previous Showing 31-40 of 41 results. Next