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 21-30 of 78 results. Next

A066352 Pillai sequence: a(n) is the smallest term in A007924 requiring n primes.

Original entry on oeis.org

0, 1, 4, 27, 1354, 401429925999155061
Offset: 0

Views

Author

Copied from www.primepuzzles.net by Frank Ellermann, Dec 19 2001

Keywords

Comments

a(5) computed independently in 2007 by R. J. Mathar and Luca & Thangadurai, both using Thomas Nicely's tables.
On Cramer's conjecture, the number of primes required is O(log* n), where log* is the iterated logarithm, so the rate of growth of a(n) is tetrational in n. - Charles R Greathouse IV, Aug 28 2010
The next term likely has hundreds of millions of digits. - Charles R Greathouse IV, Jun 29 2015

Examples

			The greatest prime <= 27 is 23; the greatest prime <= 27-23 is 3; 27-23-3 = 1, so the Pillai representation of 27 is 23+3+1, which uses more terms than all preceding numbers.
		

References

  • S. S. Pillai, "An arithmetical function concerning primes", Annamalai University Journal (1930), pp. 159-167.

Crossrefs

Cf. A007924.

Programs

Formula

a(n) = 2*p(m) - p(m-1) with minimal m = pi(a(n)) so that p(m) = a(n-1) + p(m-1), where p(n) is A008578(n).

Extensions

Edited by Charles R Greathouse IV, Oct 28 2009
Entry rewritten by Charles R Greathouse IV, Aug 28 2010

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

A053695 Differences between record prime gaps.

Original entry on oeis.org

1, 2, 2, 2, 6, 4, 2, 2, 12, 2, 8, 8, 20, 14, 10, 16, 2, 4, 14, 16, 6, 26, 30, 10, 2, 12, 14, 2, 32, 6, 4, 28, 16, 18, 28, 2, 10, 62, 8, 4, 6, 12, 4, 10, 14, 2, 16, 2, 6, 42, 6, 14, 50, 22, 42, 50, 12, 26, 2, 100, 10, 8, 208, 52, 14, 22, 4, 24, 24, 56, 28, 14, 72, 34, 12, 22
Offset: 1

Views

Author

Jeff Burch, Mar 23 2000

Keywords

Comments

The largest known term of this sequence is a(63) = 1132 - 924 = 208. This seems rather strange for a(63) > 2*100+7 where 100 = max {a(k)| k < 63}. {1,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,42,50,52,56,62,72,100,208} is the set of the distinct first 75 terms of the sequence. What is the smallest number m such that a(m) = 36? - Farideh Firoozbakht, May 30 2014
Conjecture: a(n) <= A005250(n). Based on the equivalent statement at A005250: A005250(n+1) / A005250(n) <= 2. - John W. Nicholson, Dec 30 2015

Crossrefs

Programs

  • Mathematica
    m = 2; r = 0; Differences@ Reap[Monitor[Do[If[Set[d, Set[n, NextPrime[m]] - m] > r, Set[r, d]; Sow[d]]; m = n, {i, 10^7}], i]][[-1, -1]] (* Michael De Vlieger, Oct 30 2021 *)

Formula

a(n) = A005250(n+1) - A005250(n).
A005250(n+1) = 1 + Sum_{i=1..n} a(i). - John W. Nicholson, Dec 29 2015

Extensions

Missing term 1 and more terms added by Farideh Firoozbakht, May 30 2014
a(75)-a(76) from John W. Nicholson, Feb 27 2018

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

A008995 Increasing length runs of consecutive composite numbers (endpoints).

Original entry on oeis.org

4, 10, 28, 96, 126, 540, 906, 1150, 1360, 9586, 15726, 19660, 31468, 156006, 360748, 370372, 492226, 1349650, 1357332, 2010880, 4652506, 17051886, 20831532, 47326912, 122164968, 189695892, 191913030
Offset: 1

Views

Author

Mark Cramer (m.cramer(AT)qut.edu.au). Computed by Dennis Yelle (dennis(AT)netcom.com)

Keywords

References

  • Netnews group rec.puzzles, circa Mar 01 1996 (I would like to get the exact reference).

Crossrefs

Programs

  • Mathematica
    maxGap = 1; Reap[ Do[ gap = Prime[n + 1] - (p = Prime[n]); If[gap > maxGap, Print[p + gap - 1]; Sow[p + gap - 1]; maxGap = gap], {n, 2, 10^8}]][[2, 1]] (* Jean-François Alcover, Jun 12 2013 *)

Formula

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

A058193 Smallest prime p such that there is a gap of 6n between p and the next prime.

Original entry on oeis.org

23, 199, 523, 1669, 4297, 9551, 16141, 28229, 35617, 43331, 162143, 31397, 188029, 461717, 404851, 360653, 1444309, 2238823, 492113, 1895359, 1671781, 1357201, 3826019, 11981443, 13626257, 17983717, 39175217, 37305713, 52721113
Offset: 1

Views

Author

Labos Elemer, Nov 28 2000

Keywords

Examples

			d = 72 appears after 31397, while smaller d = 54, 60, 66 come later, following primes 35617, 43331, 162143, respectively.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=32*10^5,prs,gps},prs=Prime[Range[nn]];gps=Differences[prs];Table[SelectFirst[Thread[{Most[prs],gps}],#[[2]]==6n&],{n,30}]][[;;,1]] (* Harvey P. Dale, Mar 03 2025 *)
  • PARI
    a(n) = {p=3; q = nextprime(p+1); while((q-p) != 6*n, p = q; q = nextprime(q+1)); p;} \\ Michel Marcus, Mar 12 2016

Formula

a(n) = A000230(3n).

Extensions

Offset corrected by M. F. Hasler, Apr 09 2013

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

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

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

A030296 Smallest start for a run of at least n composite numbers.

Original entry on oeis.org

4, 8, 8, 24, 24, 90, 90, 114, 114, 114, 114, 114, 114, 524, 524, 524, 524, 888, 888, 1130, 1130, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 9552, 9552, 15684, 15684, 15684, 15684, 15684, 15684, 15684, 15684, 19610, 19610, 19610
Offset: 1

Views

Author

Keywords

Comments

a(n) is even, since a(n)-1 is a prime > 2, by the minimality of a(n). - Jonathan Sondow, May 31 2014
Except for a(1), records occur at even values of n, and each term appears an even number of times consecutively. (Proof. A maximal run of composites must begin and end at even numbers.) - Jonathan Sondow, May 31 2014

Examples

			a(5) = 24 as 24 is the first of the five consecutive composite numbers 24, 25, 26, 27, 28.
		

References

  • Amarnath Murthy, Some more conjectures on primes and divisors, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = For[p1 = a[n-1]-1; p2 = NextPrime[p1], True, p1 = p2; p2 = NextPrime[p1], If[ p2-p1-1 >= n, Return[p1+1]]]; a[1] = 4; Table[a[n], {n, 1, 43}] (* Jean-François Alcover, May 24 2012 *)
    Module[{nn=20000,cmps},cmps=Table[If[CompositeQ[n],1,0],{n,nn}];Table[ SequencePosition[ cmps,PadRight[{},k,1],1][[1,1]],{k,50}]] (* Harvey P. Dale, Jan 01 2022 *)

Formula

a(n) = A104138(n) + 1. - Jonathan Sondow, May 31 2014
Previous Showing 21-30 of 78 results. Next