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-6 of 6 results.

A084162 a(n) is the length of the gap in sequence A084161.

Original entry on oeis.org

3, 8, 12, 16, 24, 32, 48, 56, 60, 68, 72, 88, 108, 128, 148, 152, 200, 224, 240, 248, 252, 260, 272, 280, 324, 360, 420, 444, 460, 516, 520, 540, 628, 684, 696, 716, 720, 744, 800, 884, 960, 1044, 1084
Offset: 0

Views

Author

Sven Simon, May 17 2003

Keywords

Comments

First occurrence maximum gaps in sequence A002313 (real primes with corresponding complex primes).
From Alexei Kourbatov, Feb 16 2016: (Start)
Dirichlet's theorem on arithmetic progressions and GRH suggest that average gaps between primes of the form 4k + 1 below x are about phi(4)*log(x). This sequence shows that the record gap ending at p grows almost as fast as phi(4)*log^2(p). Here phi(n) is A000010, Euler's totient function; phi(4)=2.
Conjecture: a(n) < phi(4)*log^2(A268963(n)); A268963 are the end-of-gap primes.
(End)
Conjecture: a(n) < phi(4)*n^2 for all n > 2. (Note the starting offset 0.) - Alexei Kourbatov, Aug 12 2017

Examples

			a(3) = 16: There are no primes p = 1 mod 4 between 73 and 89, this gap is the largest up to 89, the gap size is 16.
		

Crossrefs

Cf. A002313, A084160, A084161 (start of gap), A268963 (end of gap); A268799, A268925, A268928.

Programs

  • Mathematica
    Reap[Print[3]; Sow[3]; r = 0; p = 5; For[q = 7, q < 10^7, q = NextPrime[q], If[Mod[q, 4] == 3, Continue[]]; g = q - p; If[g > r, r = g; Print[g] Sow[g]]; p = q]][[2, 1]] (* Jean-François Alcover, Feb 20 2019, from PARI *)
  • PARI
    print1(3); r=0; p=5; forprime(q=7, 1e7, if(q%4==3, next); g=q-p; if(g>r, r=g; print1(", "g)); p=q)

A084160 First occurrence prime gaps of the primes in sequence A002313 (Real primes with corresponding complex primes). a(0) = 2 with length of gap 3. For n>0 the size of the gap in the sequence is 4n, a(n) is the starting prime of the gap.

Original entry on oeis.org

2, 13, 5, 17, 73, 293, 113, 1153, 197, 2557, 1321, 1553, 461, 2161, 1493, 1801, 10993, 9533, 15661, 27817, 76001, 24593, 16741, 40709, 53453, 58789, 62297, 33181, 256189, 110321, 112757, 344497, 39581, 138661, 269761, 448421, 78989, 50593
Offset: 0

Views

Author

Sven Simon, May 17 2003

Keywords

Comments

Real primes 2,5,13,17,29,37,... have a unique representation as sum of two squares. Values larger 2 are the primes p with p = 1 mod 4. This is sequence A002313. If p = x^2 + y^2, the corresponding complex prime is x+y*i

Examples

			a(3) = 17 because the next prime in sequence A002313 is 29, the size of the gap is 3*4 = 12.
		

References

  • Handbook of First Complex Prime Numbers, Part1+2 Ervand Kogbetliantz and Alice Krikorian, Gordon and Breach, 1971

Crossrefs

A268799 Record (maximal) gaps between primes of the form 4k + 3.

Original entry on oeis.org

4, 8, 12, 20, 24, 36, 40, 56, 60, 64, 68, 112, 120, 132, 144, 156, 168, 176, 184, 200, 240, 256, 272, 280, 296, 356, 396, 444, 452, 480, 532, 616, 620, 672, 692, 708, 840, 864, 896, 916, 1004
Offset: 1

Views

Author

Alexei Kourbatov, Feb 13 2016

Keywords

Comments

Dirichlet's theorem on arithmetic progressions and GRH suggest that average gaps between primes of the form 4k + 3 below x are about phi(4)*log(x). This sequence shows that the record gap ending at p grows almost as fast as phi(4)*log^2(p). Here phi(n) is A000010, Euler's totient function; phi(4)=2.
Conjecture: a(n) < phi(4)*log^2(A268801(n)) almost always.
Conjecture: a(n) < phi(4)*n^2 for all n>2. - Alexei Kourbatov, Aug 12 2017

Examples

			The first two primes of the form 4k+3 are 3 and 7, so a(1)=7-3=4. The next prime of this form is 11; the gap 11-7 is not a record so no term is added to the sequence. The next prime of this form is 19; the gap 19-11=8 is a new record, so a(2)=8.
		

Crossrefs

Corresponding primes: A268800 (lower ends), A268801 (upper ends).

Programs

  • Mathematica
    re = 0; s = 3; Reap[For[p = 7, p < 10^8, p = NextPrime[p], If[Mod[p, 4] != 3, Continue[]]; g = p - s; If[g > re, re = g; Print[g]; Sow[g]]; s = p]][[2, 1]] (* Jean-François Alcover, Dec 12 2018, from PARI *)
  • PARI
    re=0; s=3; forprime(p=7, 1e8, if(p%4!=3, next); g=p-s; if(g>re, re=g; print1(g", ")); s=p)

A268800 Primes 4k + 3 preceding the maximal gaps in A268799.

Original entry on oeis.org

3, 11, 31, 83, 283, 383, 1327, 2591, 7351, 7759, 11171, 11587, 31391, 46919, 147919, 288023, 360611, 425603, 507163, 666203, 1414703, 2198887, 3358151, 9287659, 11512547, 11648531, 24315047, 42453823, 145554779, 161720147, 184007671, 766668811
Offset: 1

Views

Author

Alexei Kourbatov, Feb 13 2016

Keywords

Comments

Subsequence of A002145.
A268799 lists the corresponding record gap sizes. See more comments there.

Examples

			The first two primes of the form 4k+3 are 3 and 7, so a(1)=3. The next prime of this form is 11; the gap 11-7 is not a record so no term is added to the sequence. The next prime of this form is 19; the gap 19-11=8 is a new record so a(2)=11.
		

Crossrefs

Programs

  • PARI
    re=0; s=3; forprime(p=7, 1e8, if(p%4!=3, next); g=p-s; if(g>re, re=g; print1(s", ")); s=p)

A268801 Primes 4k + 3 at the end of the maximal gaps in A268799.

Original entry on oeis.org

7, 19, 43, 103, 307, 419, 1367, 2647, 7411, 7823, 11239, 11699, 31511, 47051, 148063, 288179, 360779, 425779, 507347, 666403, 1414943, 2199143, 3358423, 9287939, 11512843, 11648887, 24315443, 42454267, 145555231, 161720627, 184008203, 766669427
Offset: 1

Views

Author

Alexei Kourbatov, Feb 13 2016

Keywords

Comments

Subsequence of A002145.
A268799 lists the corresponding record gap sizes. See more comments there.

Examples

			The first two primes of the form 4k+3 are 3 and 7, so a(1)=7. The next prime of this form is 11; the gap 11-7 is not a record so no term is added to the sequence. The next prime of this form is 19; the gap 19-11=8 is a new record so a(2)=19.
		

Crossrefs

Programs

  • PARI
    re=0; s=3; forprime(p=7, 1e8, if(p%4!=3, next); g=p-s; if(g>re, re=g; print1(p", ")); s=p)

A268963 Primes 4k+1 at the end of the maximal gaps in A084162.

Original entry on oeis.org

5, 13, 29, 89, 137, 229, 509, 1549, 1861, 9601, 15733, 16829, 33289, 39709, 50741, 180949, 183289, 1562053, 1638053, 2244157, 4469141, 4874977, 7856713, 10087481, 12021353, 12214273, 18227081, 148364081, 292182557, 320262769, 468214457, 727335397, 869766761
Offset: 0

Views

Author

Alexei Kourbatov, Feb 16 2016

Keywords

Comments

Subsequence of A002144.
A084161 lists the primes preceding the maximal gaps, and A084162 lists the corresponding gap sizes. See more comments there.

Examples

			a(3) = 89: There are no primes p = 1 mod 4 between 73 and 89, this gap is the largest up to 89, the gap size is 16.
		

Crossrefs

Programs

  • Mathematica
    Reap[Print[5]; Sow[5]; r = 0; p = 5; For[q = 7, q < 10^7, q = NextPrime[q], If[Mod[q, 4] == 3, Continue[]]; g = q - p; If[g > r, r = g; Print[q] Sow[q]]; p = q]][[2, 1]] (* Jean-François Alcover, Feb 20 2019, from PARI *)
  • PARI
    print1(5); r=0; p=5; forprime(q=7, 1e9, if(q%4==3, next); g=q-p; if(g>r, r=g; print1(", "q)); p=q)

Formula

a(n) = A084161(n) + A084162(n)
Showing 1-6 of 6 results.