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

A084105 Middle q of three consecutive primes p,q,r, such that one adjacent prime is near, the other is far and the ratio of the differences (whichever of (r-q)/(q-p) or (q-p)/(r-q) is greater than 1) sets a record.

Original entry on oeis.org

3, 29, 113, 139, 199, 523, 1151, 1669, 2971, 6947, 10007, 16141, 25471, 40639, 79699, 102761, 173359, 265621, 404851, 838249, 1349533, 1562051, 6371537, 7230479, 27980987, 42082303, 53231051, 70396589, 192983851, 253878617, 390932389, 465828731, 516540163, 1692327137
Offset: 1

Views

Author

Hugo Pfoertner, May 29 2003

Keywords

Comments

Are there entries other than a(3) for which the smaller difference exceeds 2?

Examples

			a(3) = 113 because the ratio (113-109)/(127-113) = 2/7 = 0.28571.. is smaller than the previous minimum produced by (31-29)/(29-23) = 1/3 = 0.33333...
		

Crossrefs

Programs

  • PARI
    a084105(limit)={my(p1=2,p2=3,r=0);forprime(p3=5,limit,my(q=max((p2-p1)/(p3-p2),(p3-p2)/(p2-p1)));if(q>r,r=q;print1(p2,", "));p1=p2;p2=p3)};
    a084105(600000000) \\ Hugo Pfoertner, Sep 04 2020

Extensions

More terms from Don Reble, May 29 2003
a(32)-a(34) from Hugo Pfoertner, Nov 06 2019

A337439 a(n) is the k-th prime, such that abs(prime(k) - Sum_{j=k-2..k+2} prime(j)/5) sets a new record.

Original entry on oeis.org

5, 7, 19, 47, 97, 109, 113, 199, 887, 1151, 1277, 1327, 9551, 11777, 14143, 15727, 19609, 25471, 31397, 156007, 360653, 370261, 492113, 1357201, 1357333, 1562051, 2010733, 4652507, 17051887, 20831323, 47326693, 47326913, 122164747, 189695893, 428045741, 436273291, 1453168433
Offset: 1

Views

Author

Hugo Pfoertner, Aug 29 2020

Keywords

Comments

A337438 are the corresponding values of k.

Examples

			List of first terms:
   a(n)  pi(a(n))  average-median
     5,      3,     3/5  = (2 + 3 + 5 + 7 + 11)/5 - 5
     7,      4,     4/5 = (3 + 5 + 7 + 11 + 13)/5 - 7
    19,      8,     6/5 = (13 + 17 + 19 + 23 + 29)/5 - 19
    47,     15,     8/5
    97,     25,   -12/5
   109,     29,    14/5
   113,     30,    22/5
   199,     46,    28/5
   887,    154,    34/5
  1151,    190,   -36/5
  1277,    206,   -38/5
  1327,    217,    12
  9551,   1183,    14
		

Crossrefs

Programs

  • PARI
    a337439(limp) = {my(p1=0,p2=2,p3=3,p4=5,p5=7,s=p1+p2+p3+p4+p5,d=0);forprime(p=11,limp, s=s-p1+p; my(dd=abs(s/5-p4)); if(dd>d,print1(p4,", ");d=dd); p1=p2;p2=p3;p3=p4;p4=p5;p5=p)};
    a337439(500000000)

Extensions

Name edited by Peter Munn, Aug 01 2025

A337438 a(n) is the index k of prime(k), such that abs(prime(k) - Sum_{j=k-2..k+2} prime(j)/5) sets a new record.

Original entry on oeis.org

3, 4, 8, 15, 25, 29, 30, 46, 154, 190, 206, 217, 1183, 1410, 1664, 1832, 2225, 2810, 3385, 14358, 30802, 31545, 40933, 104071, 104072, 118506, 149689, 325853, 1094422, 1319945, 2850174, 2850175, 6957876, 10539433, 22749705, 23163299, 72507381, 182837804, 415271758, 486570087
Offset: 1

Views

Author

Hugo Pfoertner, Aug 29 2020

Keywords

Comments

A337439 are the corresponding primes.

Examples

			See A337489.
		

Crossrefs

Programs

  • PARI
    \\ See A337439, replace p4 by primepi(p4) in call of print1.

Extensions

Name edited by Peter Munn, Aug 01 2025

A337488 a(n) is the index k of prime(k), such that abs(prime(k) - Sum_{j=k-1..k+1} prime(j)/3) sets a new record.

Original entry on oeis.org

2, 4, 10, 30, 99, 190, 217, 1183, 1831, 2225, 2810, 3385, 14358, 30802, 31545, 40933, 103520, 104071, 104072, 118506, 149689, 325853, 1094421, 1094422, 1319945, 2850174, 2850175, 6957876, 10539433, 10655462, 20684332, 22749705, 23163299, 33772762, 64955634, 64955635
Offset: 1

Views

Author

Hugo Pfoertner, Aug 29 2020

Keywords

Comments

A337489 are the corresponding primes.

Examples

			See A337489.
		

Crossrefs

Programs

  • PARI
    \\ See A337489, replace p3 by primepi(p3) in call of print1.

Extensions

Name edited by Peter Munn, Aug 01 2025

A084106 Larger difference (r-q or q-p) associated with A084105.

Original entry on oeis.org

2, 6, 14, 10, 12, 18, 22, 24, 28, 30, 34, 42, 52, 54, 58, 60, 70, 82, 90, 100, 118, 132, 136, 148, 150, 168, 178, 196, 208, 214, 220, 234, 250, 288, 310, 318, 330, 360, 366, 384, 390, 402, 408, 414, 454, 462, 516, 588, 598, 610, 648, 706, 712, 736, 754, 756, 760
Offset: 1

Views

Author

Hugo Pfoertner, May 29 2003

Keywords

Comments

Differences > a(46) = 462 require search beyond 10^12. - Hugo Pfoertner, Sep 02 2020
Searched range through 10^13. - Hugo Pfoertner, Sep 17 2020

Examples

			a(5)=12 because the larger difference between A084105(5)=199 and its prime neighbors 197 and 211 is 211-199=12.
a(51)=648 corresponds to the gaps between the 3 consecutive primes 9787731507761, 9787731508409, 9787731508411. - _Hugo Pfoertner_, Sep 19 2020
		

Crossrefs

Programs

  • PARI
    default(realprecision,20); default(primelimit,436270000); { apt(m)= local(dl,dr,q,qm); qm=1.0; for(n=2,m, dl=prime(n)-prime(n-1); dr=prime(n+1)-prime(n); q=min(dl,dr)/max(dl,dr)+0.; if(q
    				
  • PARI
    a084106(limit)={my(p1=2,p2=3,q=0);forprime(k=5,limit,my(r=max((p2-p1)/(k-p2),(k-p2)/(p2-p1)));if(r>q,q=r;print1(max(p2-p1,k-p2),", "));p1=p2;p2=k)};
    a084106(10^9) \\ Hugo Pfoertner, Sep 02 2020

Extensions

More terms from Don Reble and Jason Earls, May 29 2003
a(36)-a(46) from Hugo Pfoertner, Sep 02 2020
a(47)-a(51) from Hugo Pfoertner, Sep 17 2020
a(52)-a(57) from Martin Ehrenstein, Aug 07 2021
Showing 1-5 of 5 results.