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

A133429 Records in A000230.

Original entry on oeis.org

2, 3, 7, 23, 89, 139, 199, 1831, 2477, 2971, 4297, 5591, 9551, 30593, 81463, 82073, 89689, 162143, 173359, 404597, 542603, 544279, 927869, 1100977, 1444309, 2238823, 5845193, 6752623, 6958667, 7621259, 10343761, 11981443, 13626257, 17983717, 49269581, 83751121
Offset: 1

Views

Author

N. J. A. Sloane, Nov 28 2007

Keywords

Crossrefs

A133430 Where records occur in A000230.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 13, 14, 15, 16, 18, 19, 23, 28, 32, 33, 35, 37, 40, 44, 46, 47, 51, 54, 58, 62, 67, 70, 71, 72, 75, 78, 79, 83, 93, 97, 100, 112, 113, 114, 127, 128, 132, 139, 147, 149, 157, 158, 164, 167, 181, 184, 185, 194, 211, 218, 221, 226, 233, 235, 236, 241, 244
Offset: 1

Views

Author

N. J. A. Sloane, Nov 28 2007

Keywords

Crossrefs

A079024 Let p and q be two prime numbers, not necessarily consecutive, such that q - p = 2n; a(n) is the number of distinct partitions of 2n into even numbers so that each partition corresponds to a consecutive prime difference pattern (k-tuple) and p<=A000230(n). Multiple occurrences of a partition are not counted.

Original entry on oeis.org

1, 2, 3, 5, 5, 12, 9, 17, 30, 29, 32, 79, 64, 70, 236, 116, 48, 342, 375, 359, 633, 310, 852, 846, 644, 354, 1048, 1191, 635, 1664, 539, 1127, 3971, 1656, 3022, 984, 3894, 2399, 4439, 6431, 2765, 10256, 1818, 5427, 10251, 8153, 9119, 7083, 6456, 5033
Offset: 1

Views

Author

Labos Elemer, Jan 24 2003

Keywords

Comments

In case of partitions enumerated in A079022-A079024 permutation if parts is relevant since may correspond to different possible consecutive prime-difference patterns.

Examples

			Only those and distinct partitions are counted which appear not later than prime A000230(n); n=7, d=14, A000230(7)=113, number of solutions to p+14=q, - both p and q are primes and p<=113 - is 9. This 9 distinct partitions and their introducing primes are as follows:3[2244], 5[24242], 17[2462], 23[626], 29[2642], 47[662], 83[68], 89[842], 113[14]=A000230(7).
		

Crossrefs

A086977 Increasing peaks in the prime gap sequence A000230.

Original entry on oeis.org

199, 1831, 5591, 30593, 81463, 82073, 162143, 173359, 404597, 542603, 544279, 1100977, 1444309, 2238823, 5845193, 6752623, 6958667, 11981443, 13626257, 49269581, 83751121, 147684137, 166726367, 378043979, 895858039, 1872851947
Offset: 1

Views

Author

Harry J. Smith, Jul 26 2003

Keywords

Comments

a(n) is the smaller of the two consecutive primes having a late occurring prime gap g = p_k+1 - p_k. All even gaps smaller than g occur at a smaller prime. Also, the next even gap g+2 also occurs earlier.

Examples

			1831 is in this list because the next prime is 1847, giving a prime gap of 16. All even gaps less than 16 occur before this (for smaller primes) and the next even gap, 18, also occurs earlier.
		

References

  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 144.

Crossrefs

Programs

  • Mathematica
    lst={};b=max=2;Do[a=2;While[NextPrime@a-a!=2n,a=NextPrime@a];If[a=max,AppendTo[lst,b]];b=a;If[b>max,max=b],{n,40}];lst (* Giorgos Kalogeropoulos, Aug 18 2021 *)

A079023 Let p and q be two prime numbers, not necessarily consecutive, such that q - p = 2n; then a(n) is the number of partitions of 2n into even numbers so that each partition corresponds to a consecutive prime difference pattern (k-tuple) and p <= A000230(n).

Original entry on oeis.org

1, 2, 6, 9, 14, 24, 11, 56, 46, 45, 46, 109, 82, 97, 287, 124, 51, 390, 507, 434, 691, 332, 1105, 898, 676, 359, 1080, 1259, 659, 1688, 540, 1146, 4081, 1672, 3081, 985, 3975, 2423, 4460, 6512, 2779, 10324, 1820, 5458, 10273, 8196, 9177, 7085, 6462, 5037
Offset: 1

Views

Author

Labos Elemer, Jan 24 2003

Keywords

Comments

Partitions are counted with multiplicity and may overlap.

Examples

			Only those partitions are counted that appear not later than prime A000230(n); n=7, d=14, A000230(7)=113; the number of solutions to p+14=q, with p and q both prime and p <= 113, is 11. These 11 (not necessarily distinct) partitions and their initial primes are as follows: 3[22424], 5[24242], 17[2462], 23[626], 29[2642], 47[662], 53[626], 59[2642], 83[68], 89[842], 113[14]=A000230(7).
		

Crossrefs

Programs

  • PARI
    {for(n=1,50, c=0; p=2; done=0; until(done, if(isprime(p+2*n), c++; if(nextprime(p+1)-p==2*n, done=1; print1(c,","))); p=nextprime(p+1)))} \\ Rick L. Shepherd

Extensions

Corrected and extended by Rick L. Shepherd, Sep 08 2003

A082892 Floor(q(j)), where q(j) = 2j/log(A000230(j)); log is natural logarithm, 2j-s are prime gaps > 1, A000230(j) is the minimal lesser prime opening the consecutive prime distance equals 2j.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 17 2003

Keywords

Comments

For these larger and larger gap-initiating primes, integer part of relevant quotient,q, may exceed 27, all values between 1 and 28 occur. Observation supports conjecture that infsup(q) is infinity.

Crossrefs

Programs

  • Mathematica
    t=A000230 list; Table[Floor[2*j/Log[Part[t,j]]//N],{j,1,Length[t]}]

A060977 The nonprimes n!+2 ... n!+n are the a(n)-th string of n-1 prime-free consecutive terms, the first such one being the string of composite numbers A000230(k)+1 through A001632(k)-1 when n=2k, or through A001632(k)-2 when n=2k-1.

Original entry on oeis.org

0, 1, 1, 6, 27, 208, 1755, 16363, 161685, 1736749, 20022517, 250566242, 3359504253
Offset: 1

Views

Author

Lekraj Beedassy, May 10 2001

Keywords

Comments

The sequence grows rapidly, like the factorial function.

Examples

			The prime-free sequence 4! + 2 through 4! + 4, i.e., {26, 27, 28}, ranks as the a(4) = 6th triple of consecutive composite numbers, as it comes after {8, 9, 10}, {14, 15, 16}, {20, 21, 22}, {24, 25, 26}, {25, 26, 27}.
		

Crossrefs

Programs

  • Mathematica
    Do[ c = 0; a = Table[0, {n - 1} ]; k = 2; While[ k < n! + n + 1, a = Delete[a, 1]; a = Append[a, PrimeQ[k] ]; If[ Union[a] == {False}, c++ ]; k++ ]; Print[c], {n, 2, 12} ]

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 25 2001
More terms from Robert G. Wilson v, Aug 17 2001
a(13) from Sean A. Irvine, Jan 11 2023

A258930 Number of n-digit terms in A000230.

Original entry on oeis.org

3, 2, 5, 9, 15, 18, 23, 22, 34, 36, 41, 46, 55, 58, 55, 66, 83, 70
Offset: 1

Views

Author

James G. Merickel, Jun 15 2015

Keywords

Crossrefs

Cf. A000230.

A001223 Prime gaps: differences between consecutive primes.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6, 12
Offset: 1

Views

Author

Keywords

Comments

There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + a(n). - Rémi Eismann, Feb 14 2008
Let rho(m) = A179196(m), for any n, let m be an integer such that p_(rho(m)) <= p_n and p_(n+1) <= p_(rho(m+1)), then rho(m) <= n < n + 1 <= rho(m + 1), therefore a(n) = p_(n+1) - p_n <= p_rho(m+1) - p_rho(m) = A182873(m). For all rho(m) = A179196(m), a(rho(m)) < A165959(m). - John W. Nicholson, Dec 14 2011
A solution (modular square root) of x^2 == A001248(n) (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
There exists a constant C such that for n -> infinity, Cramer conjecture a(n) < C log^2 prime(n) is equivalent to (log prime(n+1)/log prime(n))^n < e^C. - Thomas Ordowski, Oct 11 2014
a(n) = A008347(n+1) - A008347(n-1). - Reinhard Zumkeller, Feb 09 2015
Yitang Zhang proved lim inf_{n -> infinity} a(n) is finite. - Robert Israel, Feb 12 2015
lim sup_{n -> infinity} a(n)/log^2 prime(n) = C <==> lim sup_{n -> infinity}(log prime(n+1)/log prime(n))^n = e^C. - Thomas Ordowski, Mar 09 2015
a(A038664(n)) = 2*n and a(m) != 2*n for m < A038664(n). - Reinhard Zumkeller, Aug 23 2015
If j and k are positive integers then there are no two consecutive primes gaps of the form 2+6j and 2+6k (A016933) or 4+6j and 4+6k (A016957). - Andres Cicuttin, Jul 14 2016
Conjecture: For any positive numbers x and y, there is an index k such that x/y = a(k)/a(k+1). - Andres Cicuttin, Sep 23 2018
Conjecture: For any three positive numbers x, y and j, there is an index k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Conjecture: For any three positive numbers x, y and j, there are infinitely many indices k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Row m of A174349 lists all indices n for which a(n) = 2m. - M. F. Hasler, Oct 26 2018
Since (6a, 6b) is an admissible pattern of gaps for any integers a, b > 0 (and also if other multiples of 6 are inserted in between), the above conjecture follows from the prime k-tuple conjecture which states that any admissible pattern occurs infinitely often (see, e.g., the Caldwell link). This also means that any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points n'. - M. F. Hasler, Oct 26 2018
Conjecture: Defining b(n,j,k) as the number of pairs of prime gaps {a(i),a(i+j)} such that i < n, j > 0, and a(i)/a(i+j) = k with k > 0, then
lim_{n -> oo} b(n,j,k)/b(n,j,1/k) = 1, for any j > 0 and k > 0, and
lim_{n -> oo} b(n,j,k1)/b(n,j,k2) = C with C = C(j,k1,k2) > 0. - Andres Cicuttin, Sep 01 2019

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 186-192.
  • 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 (primes), A001248 (primes squared), A000720, A037201, A007921, A030173, A036263-A036274, A167770, A008347.
Second difference is A036263, first occurrence is A000230.
For records see A005250, A005669.
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Haskell
    a001223 n = a001223_list !! (n-1)
    a001223_list = zipWith (-) (tail a000040_list) a000040_list
    -- Reinhard Zumkeller, Oct 29 2011
    
  • Magma
    [(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
    
  • Maple
    with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
  • Mathematica
    Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
  • PARI
    diff(v)=vector(#v-1,i,v[i+1]-v[i]);
    diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
    
  • Python
    from sympy import prime
    def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
  • Sage
    differences(prime_range(1000)) # Joerg Arndt, May 15 2011
    

Formula

G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = prime(n+1) - prime(n). - Franklin T. Adams-Watters, Mar 31 2010
Conjectures: (i) a(n) = ceiling(prime(n)*log(prime(n+1)/prime(n))). (ii) a(n) = floor(prime(n+1)*log(prime(n+1)/prime(n))). (iii) a(n) = floor((prime(n)+prime(n+1))*log(prime(n+1)/prime(n))/2). - Thomas Ordowski, Mar 21 2013
A167770(n) == a(n)^2 (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
a(n) = Sum_{k=1..2^(n+1)-1} (floor(cos^2(Pi*(n+1)^(1/(n+1))/(1+primepi(k))^(1/(n+1))))). - Anthony Browne, May 11 2016
G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
Conjecture: Limit_{N->oo} (Sum_{n=2..N} log(a(n))) / (Sum_{n=2..N} log(log(prime(n)))) = 1. - Alain Rocchelli, Dec 16 2022
Conjecture: The asymptotic limit of the average of log(a(n)) ~ log(log(prime(n))) - gamma (where gamma is Euler's constant). Also, for n tending to infinity, the geometric mean of a(n) is equivalent to log(prime(n)) / e^gamma. - Alain Rocchelli, Jan 23 2023
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston in above links). This is the basis of the last two conjectures above. - Alain Rocchelli, Feb 10 2023

Extensions

More terms from James Sellers, Feb 19 2001

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
Showing 1-10 of 108 results. Next