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 27 results. Next

A111871 Prime gaps q-p with n-th record merit referred to in A111870.

Original entry on oeis.org

1, 2, 4, 14, 22, 34, 52, 72, 86, 96, 112, 132, 148, 180, 210, 248, 282, 320, 336, 354, 382, 456, 514, 532, 582, 588, 602, 652, 716, 766, 906, 1132, 1328, 1356, 1370, 1442, 1476, 1572
Offset: 1

Views

Author

N. J. A. Sloane, based on correspondence with Ed Pegg Jr, Nov 23 2005

Keywords

Comments

The prime gaps q-p (corresponding to a(n)=p in A111870) have increasing record merit (q-p)/log(p). However, the prime gaps themselves are almost always monotonically increasing (with very high probability), but not always! And we do have an exception in the list above: a(14)=148 < a(13)=154! (But see next comment!)
Because the erroneous A111870(13) = 4652353 term was removed, a(13) = 154 was removed. This sequence is therefore monotonically increasing. - John W. Nicholson, Nov 18 2013

Examples

			A111870(4) = 113 and the next larger prime is 127, so 127 - A111870(4) = a(4) = 14.
		

References

  • Ed Pegg, Jr., Posting to Seq Fan mailing list, Nov 23, 2005

Crossrefs

For the primes p corresponding to the prime gaps q-p with n-th record merit, see A111870.

Formula

a(n) = A277552(n) - A111870(n). - Bobby Jacobs, Nov 13 2016

Extensions

Corrected and edited by Daniel Forgues, Nov 11 2009 and Nov 20 2009
Because the erroneous A111870(13) = 4652353 term was removed, a(13) = 154 was removed by John W. Nicholson, Nov 18 2013
a(33)-a(35) inserted by Bobby Jacobs, Nov 08 2016
a(37) added by Bobby Jacobs, Nov 09 2016
a(38) added by Rodolfo Ruiz-Huidobro, May 14 2024

A241542 Indices (i.e., value of A000720 = primepi) of primes in A111870.

Original entry on oeis.org

1, 2, 4, 30, 189, 217, 2225, 3385, 14357, 30802, 31545, 104071, 149689, 1094421, 1319945, 10655462, 23163298, 112228683, 182837804, 203615628, 486570087, 1094330259, 11992433550, 17883926781, 50070452577, 52302956123, 72178455400, 94906079600, 473258870471, 662221289043
Offset: 1

Views

Author

M. F. Hasler, Apr 25 2014

Keywords

Crossrefs

Formula

a(n) = A000720(A111870(n)).

Extensions

a(20)-a(30) from Amiram Eldar, Sep 03 2024

A002386 Primes (lower end) with record gaps to the next consecutive prime: primes p(k) where p(k+1) - p(k) exceeds p(j+1) - p(j) for all j < k.

Original entry on oeis.org

2, 3, 7, 23, 89, 113, 523, 887, 1129, 1327, 9551, 15683, 19609, 31397, 155921, 360653, 370261, 492113, 1349533, 1357201, 2010733, 4652353, 17051707, 20831323, 47326693, 122164747, 189695659, 191912783, 387096133, 436273009, 1294268491
Offset: 1

Views

Author

Keywords

Comments

See the links by Jens Kruse Andersen et al. for very large gaps.

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, Sect 6.1, Table 1.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 14.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A001223, A000101 (upper ends), A005250 (record gaps), A000230, A111870, A111943.
See also A205827(n) = A000040(A214935(n)), A182514(n) = A000040(A241540(n)).

Programs

  • Mathematica
    s = {2}; gm = 1; Do[p = Prime[n]; g = Prime[n + 1] - p; If[g > gm, Print[p]; AppendTo[s, p]; gm = g], {n, 2, 1000000}]; s   (* Jean-François Alcover, Mar 31 2011 *)
    Module[{nn=10^7,pr,df},pr=Prime[Range[nn]];df=Differences[pr];DeleteDuplicates[ Thread[ {Most[ pr],df}],GreaterEqual[#1[[2]],#2[[2]]]&]][[All,1]] (* The program generates the first 26 terms of the sequence. *) (* Harvey P. Dale, Sep 24 2022 *)
  • PARI
    a(n)=local(p,g);if(n<2,2*(n>0),p=a(n-1);g=nextprime(p+1)-p;while(p=nextprime(p+1),if(nextprime(p+1)-p>g,break));p) /* Michael Somos, Feb 07 2004 */
    
  • PARI
    p=q=2;g=0;until( g<(q=nextprime(1+p=q))-p && print1(q-g=q-p,","),) \\ M. F. Hasler, Dec 13 2007

Formula

a(n) = A000101(n) - A005250(n) = A008950(n-1) - 1. - M. F. Hasler, Dec 13 2007
A000720(a(n)) = A005669(n).
a(n) = A000040(A005669(n)). - M. F. Hasler, Apr 26 2014

Extensions

Definition clarified by Harvey P. Dale, Sep 24 2022

A114403 Triprime gaps. First differences of A014612.

Original entry on oeis.org

4, 6, 2, 7, 1, 2, 12, 2, 1, 5, 2, 11, 3, 2, 2, 5, 1, 2, 14, 6, 1, 3, 3, 5, 4, 2, 1, 7, 1, 5, 8, 9, 1, 5, 1, 10, 1, 5, 1, 1, 2, 1, 7, 4, 2, 2, 5, 12, 5, 10, 8, 1, 5, 2, 4, 2, 1, 1, 9, 3, 3, 5, 2, 5, 2, 4, 3, 2, 1, 1, 4, 2, 18, 6, 2, 4, 3, 7, 1, 5, 5, 2, 9, 2, 1
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Examples

			a(1) = 4 = 12-8 where 8 is the first triprime and 12 is the second.
a(2) = 6 = 18-12
a(3) = 2 = 20-18
a(4) = 7 = 27-20
		

Crossrefs

Programs

  • Maple
    is3Alm := proc(n::integer) local ifa,ex,i ; ifa := op(2,ifactors(n)) ; ex := 0 ; for i from 1 to nops(ifa) do ex := ex+ op(2,op(i,ifa)) ; od : if ex = 3 then RETURN(true) ; else RETURN(false) ; fi ; end: A014612 := proc(n::integer) local resul,i; i :=1; resul := 8 ; while i < n do resul := resul + 1 ; if is3Alm(resul) then i := i+1 ; fi ; od ; RETURN(resul) ; end: A114403 := proc(n::integer) RETURN(A014612(n+1)-A014612(n)) ; end: for n from 1 to 160 do printf("%d,",A114403(n)) ; od: # R. J. Mathar, Apr 25 2006
  • Mathematica
    Differences[Select[Range[425], PrimeOmega[#] == 3 &]] (* Jayanta Basu, Jul 01 2013 *)

Formula

a(n) = A014612(n+1) - A014612(n).

Extensions

Corrected and extended by R. J. Mathar, Apr 25 2006

A114412 Records in semiprime gaps ordered by merit.

Original entry on oeis.org

2, 3, 4, 6, 11, 19, 24, 28, 30, 32, 38, 47, 54, 70, 74, 107, 110, 112, 120, 126, 146
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Comments

There is an associated index list n = 1, 2, 4, 6, 34, 422, 1765, 4585, 8112, 8650, 8861, 75150, ... and an associated semiprime list A001358(n) = 4, 6, 10, 15, 1418, 6559, 17965, 32777, 35103, 35981, 340894, ... - R. J. Mathar, Mar 15 2009

Examples

			Records defined in terms of A065516 and A001358:
.
  n  A065516(n)  A065516(n)/log_10(A001358(n))
  =  ==========  ==============================
  1       2      2 / log_10(4)  = 3.32192809...
  2       3      3 / log_10(6)  = 3.85529162...
  3       1      1 / log_10(9)  = 1.04795163...
  4       4      4 / log_10(10) = 4.00000000
  5       1      1 / log_10(14) = 0.87250286...
  6       6      6 / log_10(15) = 5.10164492...
  7       1      1 / log_10(21) = 0.75630419...
  8       3      3 / log_10(22) = 2.23476557...
  9       1      1 / log_10(25) = 0.71533827...
		

Crossrefs

Programs

  • Mathematica
    sp = 4; m0 = 0;  l = {}; lim = 1000000;
    For[i = 5, i <= lim, i++, If[PrimeOmega[i] == 2, m = (i - sp)/Log[sp]; If[m > m0, m0 = m; AppendTo[l, i - sp]]; sp = i] ]; l (* Robert Price, Oct 29 2018 *)

Formula

a(n) = records in A065516(n)/log_10(A001358(n)) = records in (A001358(n+1) - A001358(n))/log_10(A001358(n)).

Extensions

Corrected and extended by Charles R Greathouse IV, Oct 05 2006
a(16)-a(21) from Donovan Johnson, Feb 17 2010

A205827 Primes prime(k) corresponding to the records in the sequence (prime(k+1)/prime(k))^k.

Original entry on oeis.org

2, 3, 7, 23, 113, 1129, 1327, 19609, 31397, 155921, 360653, 370261, 1357201, 2010733, 17051707, 20831323, 191912783, 436273009, 2300942549, 3842610773, 4302407359, 10726904659, 25056082087, 304599508537, 461690510011, 1346294310749, 1408695493609
Offset: 1

Views

Author

Thomas Ordowski, May 07 2012

Keywords

Comments

Probably A111870 is this sequence with the exception of the term a(4) = 23. - Farideh Firoozbakht, May 07 2012
For n from 5 to 28, a(n) = A111870(n-1). - Donovan Johnson, Oct 26 2012
The statement prime(k) > (prime(k+1)/prime(k))^k for k>=1 is a rewrite of the Firoozbakht conjecture (see link). - John W. Nicholson, Oct 27 2012
Values of k are in A214935.
The logarithmic (base 10) graph seems to be linearly asymptotic to n with slope ~ 1/log(10) which would imply that: log(prime(k)) ~ n as n goes to infinity. [Copy of comment by N. J. A. Sloane, Aug 27 2010 for A111870, copied and corrected for prime(k) by John W. Nicholson, Oct 29 2012]
(prime(k+1)/prime(k))^k ~ e^merit(k), where merit(k) = (prime(k+1)-prime(k))/log(prime(k)). - Thomas Ordowski, Mar 18 2013
Subset of A002386. - John W. Nicholson, Nov 19 2013
Copied comment from A111870 (modified variable to k): (prime(k+1)/prime(k))^k > 1 + merit(k) for k > 2, where merit(k) = (prime(k+1)-prime(k))/log(prime(k)). - Thomas Ordowski, May 14 2012 : Copied and modified by John W. Nicholson, Nov 20 2013

Examples

			The sequence (prime(k+1)/prime(k))^k for k=1,2,... starts with:
*1.500, *2.777, 2.744, *6.098, 2.305, 5.001, 2.178, 4.611, *8.054, 1.948, ...,
where records are marked with *. The corresponding primes are a(1)=prime(1)=2, a(2)=prime(2)=3, a(3)=prime(4)=7, a(4)=prime(9)=23, ...
		

Crossrefs

Programs

  • Mathematica
    t = {}; p = 2; best = 0; n = 0; While[n++; last = p; p = NextPrime[p]; p <= 100000, f = (p/last)^n; If[f > best, best = f; AppendTo[t, last]]]; t (* T. D. Noe, May 08 2012 *)
  • PARI
    record=0;for(n=1,75,current=(A000101[n]/A002386[n]*1.)^A005669[n];if(current>record,record=current;print1(A002386[n],", "))) \\ Each sequence is read in as a vector as to overcome PARI's primelimit. John W. Nicholson, Dec 01 2013

Formula

a(n) = A000040(A214935(n)).

Extensions

a(13)-a(25) from Donovan Johnson, May 08 2012
Definition corrected by Max Alekseyev, Oct 23 2012
Clarified definition with k as index of a(n)=prime(k) instead of index n, John W. Nicholson, Oct 24 2012
a(26)-a(28) from Donovan Johnson, Oct 26 2012
a(29)-a(38) from John W. Nicholson, Dec 01 2013

A214935 Index of the primes of A205827, A000720(A205827(n)).

Original entry on oeis.org

1, 2, 4, 9, 30, 189, 217, 2225, 3385, 14357, 30802, 31545, 104071, 149689, 1094421, 1319945, 10655462, 23163298, 112228683, 182837804, 203615628, 486570087, 1094330259, 11992433550, 17883926781, 50070452577, 52302956123, 72178455400
Offset: 1

Views

Author

John W. Nicholson, Oct 28 2012

Keywords

Comments

A000040(a(n)) = A205827(n).
With pi(x) being the prime counting function, A000720(x), for n from 1 to 3, a(n) = pi(A111870(n)) = A241542(n), for n from 5 to 28, a(n) = pi(A111870(n-1)) = A241542(n-1). - John W. Nicholson, May 10 2014

Examples

			a(4) = 9, A000040(9) = 23, and A205827(4) = 23.
		

Crossrefs

Cf. A205827.

Programs

Formula

a(n) = pi(A205827(n)) = A000720(A205827(n)).

Extensions

a(13)-a(28) from Donovan Johnson, Oct 28 2012
a(29)-a(38) from John W. Nicholson, Dec 01 2013

A082891 Smallest prime p such that q = (r-p)/log(p) > n, where r is the next prime after p.

Original entry on oeis.org

2, 7, 1129, 1327, 19609, 31397, 155921, 370261, 1357201, 2010733, 20831323, 20831323, 191912783, 436273009, 3842610773, 10726904659, 25056082087, 25056082087, 25056082087, 1346294310749, 1408695493609, 2614941710599, 13829048559701, 19581334192423, 19581334192423
Offset: 1

Views

Author

Labos Elemer, Apr 17 2003

Keywords

Comments

Is lim superior(q(n)) = +infinity? See A082892.

Examples

			For n = 11 and 12: k = 1319945: p(k+1) = 20831533, p(k) = 20831323, d = p(k+1) - p(k) = 210, log(20831321) = 16.852..., q = 210/16.852... = 12.4615... > 12 and also > 11 for the first time, so a(11) = a(12) = 20831323.
		

Crossrefs

Programs

  • Mathematica
    Do[s=(Prime[n+1]-Prime[n])/Log[Prime[n]]//N; If[s>11, Print[{n, Prime[n], Prime[n+1], s, Log[Prime[n]]//N}]], {n, 1000000, 100000000}]
  • PARI
    lista(pmax) = {my(n = 1, prv = 2, d, m); print1(2, ", "); forprime(p=3, pmax, d = p-prv; m = floor(d/log(prv)); if(m > n, for(k = 1, m-n, print1(prv, ", ")); n = m); prv=p);} \\ Amiram Eldar, Nov 04 2024

Formula

a(n)= Min{p(x); (p(x+1)-p(x))/log(p(x)) > n}.

Extensions

a(10) corrected and a(13)-a(25) added by Amiram Eldar, Nov 04 2024

A111943 Prime p with prime gap q - p of n-th record Cramer-Shanks-Granville ratio, where q is smallest prime larger than p and C-S-G ratio is (q-p)/(log p)^2.

Original entry on oeis.org

23, 113, 1327, 31397, 370261, 2010733, 20831323, 25056082087, 2614941710599, 19581334192423, 218209405436543, 1693182318746371
Offset: 1

Views

Author

N. J. A. Sloane, following emails from R. K. Guy and Ed Pegg Jr, Nov 27 2005

Keywords

Comments

Primes less than 23 are anomalous and are excluded.
a(12) was discovered by Bertil Nyman in 1999.
Shanks conjectures that the ratio will never reach 1. Granville conjectures the opposite: that the ratio will exceed or come arbitrarily close to 2/e^gamma = 1.1229....
Firoozbakht's conjecture implies that the ratio is below 1-1/log(p) for all primes p>=11; see Th.1 of arXiv:1506.03042. In Cramér's probabilistic model of primes, the ratio is below 1-1/log(p) for almost all maximal gaps between primes; see A235402. - Alexei Kourbatov, Jan 28 2016

Examples

			-----------------------------
n   ratio                a(n)
-----------------------------
1   0.6103                23
2   0.6264               113
3   0.6575              1327
4   0.6715             31397
5   0.6812            370261
6   0.7025           2010733
7   0.7394          20831323
8   0.7953       25056082087
9   0.7975     2614941710599
10  0.8177    19581334192423
11  0.8311   218209405436543
12  0.9206  1693182318746371
		

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Springer-Verlag, Third Edition, 2004, A8.

Crossrefs

Subsequence of A002386.

Programs

  • PARI
    r=CSG=0;p=13;forprime(q=17,1e8,if(q-p>r,r=q-p; t=r/log(p)^2; if(t>CSG, CSG=t; print1(p", ")));p=q) \\ Charles R Greathouse IV, Apr 07 2013

Extensions

Corrected and edited (p_n could be misinterpreted as the n-th prime) by Daniel Forgues, Nov 20 2009
Edited by Charles R Greathouse IV, May 14 2010

A182514 Primes prime(n) such that (prime(n+1)/prime(n))^n > n.

Original entry on oeis.org

2, 3, 7, 113, 1327, 1693182318746371
Offset: 1

Views

Author

Thomas Ordowski, May 04 2012

Keywords

Comments

The Firoozbakht conjecture: (prime(n+1))^(1/(n+1)) < prime(n)^(1/n), or prime(n+1) < prime(n)^(1+1/n), prime(n+1)/prime(n) < prime(n)^(1/n), (prime(n+1)/prime(n))^n < prime(n).
Using the Mathematica program shown below, I have found no further terms below 2^27. I conjecture that this sequence is finite and that the terms stated are the only members. - Robert G. Wilson v, May 06 2012 [Warning: this conjecture may be false! - N. J. A. Sloane, Apr 25 2014]
I conjecture the contrary: the sequence is infinite. Note that 10^13 < a(6) <= 1693182318746371. - Charles R Greathouse IV, May 14 2012
[Stronger than Firoozbakht] conjecture: All (prime(n+1)/prime(n))^n values, with n >= 5, are less than n*log(n). - John W. Nicholson, Dec 02 2013, Oct 19 2016
The Firoozbakht conjecture can be rewritten as (log(prime(n+1)) / log(prime(n)))^n < (1+1/n)^n. This suggests the [weaker than Firoozbakht] conjecture: (log(prime(n+1))/log(prime(n)))^n < e. - Daniel Forgues, Apr 26 2014
All a(n) <= a(6) are in A002386, A205827, and A111870.
The inequality in the definition is equivalent to the inequality prime(n+1)-prime(n) > log(n)*log(prime(n)) for sufficiently large n. - Thomas Ordowski, Mar 16 2015
Prime indices, A000720(a(n)) = 1, 2, 4, 30, 217, 49749629143526. - John W. Nicholson, Oct 25 2016

Examples

			7 is in the list because, being the 4th prime, and 11 the fifth prime, we verify that (11/7)^4 = 6.09787588507... which is greater than 4.
11 is not on the list because (13/11)^5 = 2.30543740804... and that is less than 5.
		

References

  • Farhadian, R. (2017). On a New Inequality Related to Consecutive Primes. OECONOMICA, vol 13, pp. 236-242.

Crossrefs

Cf. A111870.

Programs

  • Mathematica
    Prime[Select[Range[1000], (Prime[# + 1]/Prime[#])^# > # &]] (* Alonso del Arte, May 04 2012 *)
    firoozQ[n_, p_, q_] := n * Log[q] > Log[n] + n * Log[p]; k = 1; p = 2; q = 3; While[ k < 2^27, If[ firoozQ[k, p, q], Print[{k, p}]]; k++; p = q; q = NextPrime@ q] (* Robert G. Wilson v, May 06 2012 *)
  • PARI
    n=1;p=2;forprime(q=3,1e6,if((q/p*1.)^n++>n, print1(p", "));p=q) \\ Charles R Greathouse IV, May 14 2012
    
  • PARI
    for(n=1,75,if((A000101[n]/A002386[n]*1.)^A005669[n]>=A005669[n], print1(A002386[n],", "))) \\ Each sequence is read in as a vector as to overcome PARI's primelimit \\ John W. Nicholson, Dec 01 2013
    
  • PARI
    q=3;n=2; forprime(p=5, 10^9,result=(p/q)^n/(n*log(n));if(result>1, print(q," ",p, " ", n, " ", result));n++;q=p) \\ for stronger than Firoozbakht conjecture \\ John W. Nicholson, Mar 16 2015, Oct 19 2016

Extensions

a(6) from John W. Nicholson, Dec 01 2013
Showing 1-10 of 27 results. Next