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

A075051 Smallest prime for which the n closest primes are smaller.

Original entry on oeis.org

3, 113, 113, 113, 1327, 1327, 15683, 15683, 248909, 265621, 492113, 492113, 3851459, 7743233, 18640103, 18640103, 18640103, 435917249, 435917249, 435917249, 649580171, 649580171, 19187736221, 19187736221, 19187736221, 94746870541, 94746870541, 673420121333, 1975675658371
Offset: 1

Views

Author

Neil Fernandez, Oct 10 2002

Keywords

Comments

It is surprising that few of the above entries are at the beginning of a prime gap in A000230 or A002386.

Examples

			The smallest prime number for which the three closest primes to itself are all smaller than itself is 113 (the closest primes being 109, 107 and 103). So a(3)=113.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; k = 1; Do[ps = Table[0, {n + 1}]; ps = Append[ps, Max[k, 1]]; While[ps = Drop[ps, 1]; ps = Append[ps, NextPrim[ ps[[ -1]]]]; ps[[ -1]] - ps[[ -2]] <= ps[[ -2]] - ps[[1]], ]; Print[ ps[[ -2]]]; k = PrevPrim[ ps[[1]]], {n, 1, 30}]

Extensions

Edited and extended by Robert G. Wilson v, Oct 12 2002
a(23)-a(29) from Donovan Johnson, Jun 19 2008

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

A246782 Numbers k such that A182134(k)=2, i.e., there exist only two primes p with prime(k) < p < prime(k)^(1+1/k).

Original entry on oeis.org

5, 6, 7, 9, 10, 11, 14, 15, 22, 23, 28, 29, 30, 45, 46, 61, 66, 216, 217, 367, 3793, 1319945, 1576499, 8040877, 17567976, 44405858, 445538764, 1478061204, 3643075047, 17440041685, 190836014732, 714573709895, 714573709896
Offset: 1

Views

Author

Farideh Firoozbakht, Oct 12 2014

Keywords

Comments

Firoozbakht's conjecture says that for every n, there exists at least one prime p such that prime(n) < p < prime(n)^(1+1/n).
Let A(m) = {n | A182134(n) = m} where A182134(n) = #{p | p is prime and prime(n) < p < prime(n)^(1+1/n)}. This sequence gives the terms of A(2) and the sequence A246781 gives the terms of A(3).
The only known indices n for which A182134(n) = 1 are {1, 2, 3, 4, 8}. It is conjectured that this is the complete set A(1).
Conjecture: For all m, where m is greater than one, A(m) is an infinite set.
a1 = 49749629143524, a2 = 1475067052906944 and a3 = 1475067052906945 are three large terms of the sequence. It is interesting that a3 - a2 = 1.
Conjecture: The sequence is infinite.
Next term is greater than 25000000.
a(34) > 10^12. - Robert Price, Nov 01 2014
The conjecture that A(1)={1, 2, 3, 4, 8} holds through 10^12. - Robert Price, Nov 01 2014

Examples

			5 is in the sequence since there exists only two primes p, prime(5) < p < prime(5)^(1+1/5). Note that prime(5) = 11, 11^(1+1/5) ~ 17.77 and 11 < 13 < 17 < 17.77.
		

Crossrefs

Programs

  • Haskell
    a246782 n = a246782_list !! (n-1)
    a246782_list = filter ((== 2) . a182134) [1..]
    -- Reinhard Zumkeller, Nov 17 2014
  • Mathematica
    np[n_]:=(a = Prime[n]; b = a^(1 + 1/n); Length[Select[Range[a+1,b], PrimeQ]]); Do[If[np[n] == 2,Print[n]], {n, 25000000}]
  • PARI
    for(n=1,oo,2==primepi(prime(n)^(1+1/n))-n&&print1(n", ")) \\ M. F. Hasler, Nov 03 2014
    

Extensions

a(26)-a(27) from Robert Price, Oct 24 2014
a(28)-a(33) from Robert Price, Nov 01 2014

A002540 Increasing gaps between prime-powers.

Original entry on oeis.org

1, 5, 13, 19, 32, 53, 89, 139, 199, 293, 887, 1129, 1331, 5591, 8467, 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

List of prime-powers where A057820 increases.
The entry K=a(k) is the start of the smallest chain of m=A121492(k) consecutive numbers such that lcm(1,2,...,K) = lcm(1,2,...,K,K+1) = lcm(1,2,...,K,K+1,K+2) = ... = lcm(1,2,...,K,...,K+m-1). See A121493. - Lekraj Beedassy, Aug 03 2006

References

  • J. P. Gram, Undersoegelser angaaende maengden af primtal under en given graense, Det Kongelige Danskevidenskabernes Selskabs Skrifter, series 6, vol. 2 (1884), 183-288; see p. 255.
  • 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. A000961 (prime-powers), A057820 (gaps), A002386 (prime equivalent), A094158, A121493.

Programs

  • Mathematica
    s = {}; gap = 0; p1 = 1; Do[If[PrimePowerQ[p2], If[(d = p2 - p1) > gap, gap = d; AppendTo[s, p1]]; p1 = p2], {p2, 2, 10^6}]; s (* Amiram Eldar, Dec 12 2022 *)
    Join[{1},Rest[Module[{nn=5*10^6,pps},pps=Select[Range[nn],PrimePowerQ]; DeleteDuplicates[ Thread[{Most[ pps],Differences[ pps]}],GreaterEqual[ #1[[2]],#2[[2]]]&]][[;;,1]]]] (* The program generates the first 27 terms of the sequence. *) (* Harvey P. Dale, Aug 20 2024 *)
  • PARI
    /* calculates smaller terms - see Donovan Johnson link for larger terms */
    isA000961(n) = (omega(n) == 1 || n == 1)
    d_max=0;n_prev=1;for(n=2,1e6,if(isA000961(n),d=n-n_prev;if(d>d_max,print(n_prev);d_max=d);n_prev=n)) \\ Michael B. Porter, Oct 31 2009

Extensions

Second term corrected by Donovan Johnson, Nov 13 2008 (cf. A094158)
a(28)-a(79) from Donovan Johnson, Nov 14 2008

A036061 Increasing gaps among twin primes: the largest prime of the starting twin pair.

Original entry on oeis.org

5, 7, 19, 43, 73, 313, 349, 661, 2383, 5881, 13399, 18541, 24421, 62299, 187909, 687523, 688453, 850351, 2868961, 4869913, 9923989, 14656519, 17382481, 30752233, 32822371, 96894043, 136283431, 234966931, 248641039, 255949951, 390817729, 698542489, 2466641071
Offset: 1

Views

Author

Keywords

Comments

Has many terms in common with A054691, but neither of the two is a subsequence of the other one. - M. F. Hasler, May 07 2022

Crossrefs

Programs

  • Mathematica
    Block[{s = Select[Partition[Prime@ Range[10^7], 2, 1], Subtract @@ # == -2 &][[All, -1]], t}, t = Differences@ s; Map[s[[FirstPosition[t, #]]] &, Union@ FoldList[Max, t]][[All, 1]]] (* Michael De Vlieger, Jan 18 2019 *)

Formula

a(n) = A036062(n) - A036063(n).
a(n) = A113275(n) + 2.

Extensions

Terms 5, 7 prepended by Max Alekseyev, Nov 05 2015
a(17) corrected and a(31)-a(33) from Sean A. Irvine, Oct 21 2020

A062529 Smallest prime p such that there is a gap of 2^n between p and the next prime.

Original entry on oeis.org

2, 3, 7, 89, 1831, 5591, 89689, 3851459, 1872851947, 1999066711391, 22790428875364879
Offset: 0

Views

Author

Labos Elemer, Jun 25 2001

Keywords

Comments

a(11) <= 79419801290172271035479303914142441 and a(12) <= 55128448018333565337014555712123010955456071077000028555991469751. - Abhiram R Devesh, Aug 09 2014
From Zhining Yang, Dec 02 2022: (Start)
a(11) = 5333419265419188034369535864125349, 34 digits, discovered by Helmut Spielauer in 2013
a(12) = 55128448018333565337014555712123010955456071077000028555991469751, 65 digits, discovered by Helmut Spielauer in 2013
a(13) = 192180552346991956641101827551986346298837407139466361414211497406670710665021150917759713696699494356609164354068319457039591759, 129 digits, discovered by Dana Jacobsen in 2016
a(14) = 267552521*631#/210 - 9606, 268 digits, discovered by Dana Jacobsen in 2016
a(15) = 2717*1303#/268590 - 16670, 552 digits, discovered by Dana Jacobsen in 2014
a(16) = 7079*3559#/9870 - 36310, 1517 digits, discovered by Michiel Jansen, Pierre Cami, and Jens Kruse Andersen in 2013
a(17) = 1111111111111111111*9059#/(11#*5237) - 86522, 3899 digits, discovered by Hans Rosenthal in 2017
a(11) to a(17) were searched from Thomas R. Nicely's homepage. (End)
Importantly, the values in the previous comment are only upper bounds on a(11)-a(17), and are (almost certainly) not the correct values. As of this comment, the largest prime gap length whose first occurrence is known is 1676 < 2^11. - Brian Kehrig, May 01 2025

Examples

			a(2)=7 because 7 and 11 are consecutive primes with difference 2^2=4.
a(3)=89 because 89 and 97 are consecutive primes with difference 2^3=8.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[Prime[k + 1] != n + Prime[k], k++ ]; Prime[k]]; Do[ Print[ f[2^n]], {n, 0, 10}] (* Robert G. Wilson v, Jan 13 2005 *)
  • Python
    import sympy
    n=0
    while n>=0:
        p=2
        while sympy.nextprime(p)-p!=(2**n):
            p=sympy.nextprime(p)
        print(p)
        n=n+1
        p=sympy.nextprime(p)
    ## Abhiram R Devesh, Aug 09 2014

Formula

a(n) = A000230(2^(n-1)). - R. J. Mathar, Jan 12 2007
a(n) = A000230(2^(n-1)) = Min{p|nextprime(p)-p = 2^n} [may need adjusting since offset has been changed].

Extensions

a(10) sent by Robert G. Wilson v, Jan 13 2005
a(11)-a(12) removed by Brian Kehrig, May 01 2025

A113275 Lesser of twin primes for which the gap before the following twin primes is a record.

Original entry on oeis.org

3, 5, 17, 41, 71, 311, 347, 659, 2381, 5879, 13397, 18539, 24419, 62297, 187907, 687521, 688451, 850349, 2868959, 4869911, 9923987, 14656517, 17382479, 30752231, 32822369, 96894041, 136283429, 234966929, 248641037, 255949949
Offset: 1

Views

Author

Bernardo Boncompagni, Oct 21 2005

Keywords

Examples

			The smallest twin prime pair is 3, 5, then 5, 7 so a(1) = 3; the following pair is 11, 13 so a(2) = 5 because 11 - 5 = 6 > 5 - 3 = 2; the following pair is 17, 19: since 17 - 11 = 6 = 11 - 5 nothing happens; the following pair is 29, 31 so a(3)= 17 because 29 - 17 = 12 > 11 - 5 = 6.
		

Crossrefs

Record gaps are given in A113274. Cf. A002386.

Programs

  • Mathematica
    NextLowerTwinPrim[n_] := Block[{k = n + 2}, While[ !PrimeQ[k] || !PrimeQ[k + 2], k++ ]; k]; p = 3; r = 0; t = {3}; Do[q = NextLowerTwinPrim[p]; If[q > r + p, AppendTo[t, p]; r = q - p]; p = q, {n, 10^9}] (* Robert G. Wilson v, Oct 22 2005 *)

Formula

a(n) = A036061(n) - 2.
a(n) = A036062(n) - A113274(n).

Extensions

a(22)-a(30) from Robert G. Wilson v, Oct 22 2005
Terms up to a(72) are listed in Kourbatov (2013), terms up to a(75) in Oliveira e Silva's website, added by Max Alekseyev, Nov 06 2015

A127596 Numbers k such that 1 + Sum_{i=1..k-1} A001223(i)*(-1)^i = 0.

Original entry on oeis.org

2, 4, 14, 22, 28, 233, 249, 261, 488, 497, 511, 515, 519, 526, 531, 534, 548, 562, 620, 633, 635, 2985, 3119, 3123, 3128, 3157, 4350, 4358, 4392, 4438, 4474, 4484, 4606, 4610, 4759, 5191, 12493, 1761067, 2785124, 2785152, 2785718, 2785729, 2867471
Offset: 1

Views

Author

Manuel Valdivia, Apr 03 2007

Keywords

Comments

Or, with prime(0) = 1, numbers k such that Sum_{i=0..k-1} (prime(i+1)-prime(i))*(-1)^i = Sum_{i=0..k-1} (A008578(i+1)-A008578(i))*(-1)^i = 0.
There are 313 terms < 10^7, 846 terms < 10^8, 1161 terms < 10^9.

Examples

			1 - A001223(1) = 1 - 1 = 0, hence 2 is a term.
1 - A001223(1) + A001223(2) - A001223(3) = 1 - 1 + 2 - 2 = 0, hence 4 is a term.
		

Crossrefs

Cf. A001223 (differences between consecutive primes), A008578 (prime numbers at the beginning of the 20th century), A000101 (increasing gaps between primes, upper end), A002386 (increasing gaps between primes, lower end).
Cf. A282178 (prime(a(n))), A330545, A330547.

Programs

  • Mathematica
    S=0; Do[j=Prime[n+1]; i=Prime[n]; d[n]=j-i; S=S+(d[n]*(-1)^n); If[S+1==0, Print[Table[j|PrimePi[j]|S+1]]], {n,1,10^7,1}]
  • PARI
    {m=10^8; n=1; p=1; e=1; s=0; while(nKlaus Brockhaus, Apr 29 2007 */

Extensions

Edited by Klaus Brockhaus, Apr 29 2007

A141857 Primes congruent to 10 mod 11.

Original entry on oeis.org

43, 109, 131, 197, 241, 263, 307, 373, 439, 461, 571, 593, 659, 769, 857, 967, 1033, 1187, 1231, 1297, 1319, 1429, 1451, 1583, 1627, 1693, 1759, 1847, 1913, 1979, 2089, 2111, 2221, 2243, 2287, 2309, 2441, 2551, 2617, 2683, 2749, 2837, 2903, 2969, 3079, 3167
Offset: 1

Views

Author

N. J. A. Sloane, Jul 11 2008

Keywords

Comments

From N. J. A. Sloane, Jan 29 2014: (Start)
If p = 11k+10 then k must be odd, so p is also of the form 22r+21.
Note that the differences are surely unbounded - compare A002386. (End)

Crossrefs

Cf. A002386.

Programs

Formula

a(n) ~ 10n log n. - Charles R Greathouse IV, Jul 02 2016

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
Previous Showing 31-40 of 125 results. Next