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

A086978 Increasing peaks in the prime gap sequence A001632.

Original entry on oeis.org

211, 1847, 5623, 30631, 81509, 82129, 162209, 173429, 404671, 542683, 544367, 1101071, 1444411, 2238931, 5845309, 6752747, 6958801, 11981587, 13626407, 49269739, 83751287, 147684323, 166726561, 378044179, 895858267, 1872852203
Offset: 1

Views

Author

Harry J. Smith, Jul 26 2003

Keywords

Comments

a(n) is the larger 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

			1847 is in this list because the previous prime is 1831, 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

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

A000230 a(0)=2; for n>=1, a(n) = smallest prime p such that there is a gap of exactly 2n between p and next prime, or -1 if no such prime exists.

Original entry on oeis.org

2, 3, 7, 23, 89, 139, 199, 113, 1831, 523, 887, 1129, 1669, 2477, 2971, 4297, 5591, 1327, 9551, 30593, 19333, 16141, 15683, 81463, 28229, 31907, 19609, 35617, 82073, 44293, 43331, 34061, 89689, 162143, 134513, 173359, 31397, 404597, 212701, 188029, 542603, 265621, 461717, 155921, 544279, 404851, 927869, 1100977, 360653, 604073
Offset: 0

Views

Author

Keywords

Comments

p + 1 = A045881(n) starts the smallest run of exactly 2n-1 successive composite numbers. - Lekraj Beedassy, Apr 23 2010
Weintraub gives upper bounds on a(252), a(255), a(264), a(273), and a(327) based on a search from 1.1 * 10^16 to 1.1 * 10^16 + 1.5 * 10^9, probably performed on a 1970s microcomputer. - Charles R Greathouse IV, Aug 26 2022

Examples

			The following table, based on a very much larger table in the web page of Tomás Oliveira e Silva (see link) shows, for each gap g, P(g) = the smallest prime such that P(g)+g is the smallest prime number larger than P(g);
* marks a record-holder: g is a record-holder if P(g') > P(g) for all (even) g' > g, i.e., if all prime gaps are smaller than g for all primes smaller than P(g); P(g) is a record-holder if P(g') < P(g) for all (even) g' < g.
This table gives rise to many sequences: P(g) is A000230, the present sequence; P(g)* is A133430; the positions of the *'s in the P(g) column give A100180, A133430; g* is A005250; P(g*) is A002386; etc.
   -----
   g P(g)
   -----
   1* 2*
   2* 3*
   4* 7*
   6* 23*
   8* 89*
   10 139*
   12 199*
   14* 113
   16 1831*
   18* 523
   20* 887
   22* 1129
   24 1669
   26 2477*
   28 2971*
   30 4297*
   32 5591*
   34* 1327
   36* 9551*
   ........
The first time a gap of 4 occurs between primes is between 7 and 11, so a(2)=7 and A001632(2)=11.
		

References

  • 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

A001632(n) = 2n + a(n) = nextprime(a(n)).
Cf. A100964 (least prime number that begins a prime gap of at least 2n).

Programs

Formula

a(n) = A000040(A038664(n)). - Lekraj Beedassy, Sep 09 2006

Extensions

a(29)-a(37) from Jud McCranie, Dec 11 1999
a(38)-a(49) from Robert A. Stump (bee_ess107(AT)yahoo.com), Jan 11 2002
"or -1 if ..." added to definition at the suggestion of Alexander Wajnberg by N. J. A. Sloane, Feb 02 2020

A121069 Conjectured sequence for jumping champions greater than 1 (most common prime gaps up to x, for some x).

Original entry on oeis.org

2, 4, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 304250263527210, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070
Offset: 1

Views

Author

Lekraj Beedassy, Aug 10 2006

Keywords

Comments

If n > 2, then a(n) = product of n-1 consecutive distinct prime divisors. E.g. a(5)=210, the product of 4 consecutive and distinct prime divisors, 2,3,5,7. - Enoch Haga, Dec 08 2007
From Bill McEachen, Jul 10 2022: (Start)
Rather than have code merely generating the conjectured values, one can compare values of sequence terms at the same position n. Specifically, locate new maximums where (p,p+even) are both prime, where even=2,4,6,8,... and the datum set is taken with even=4. A new maximum implies a new jumping champion.
Doing this produces the terms 2,4,6,30,210,2310,30030,.... Looking at the plot of a(n) ratio for gap=2/gap=6, the value changes VERY slowly, and is 2.14 after 50 million terms (one can see the trend via Plot 2 of A001359 vs A023201 (3rd option seqA/seqB vs n). The ratio for gap=4/gap=2 ~ 1, implying they are equally frequent. (End)

Crossrefs

Programs

  • Mathematica
    2,4,Table[Product[Prime[k],{k,1,n-1}],{n,3,30}]
  • PARI
    print1("2, 4");t=2;forprime(p=3,97,print1(", ",t*=p)) \\ Charles R Greathouse IV, Jun 11 2011

Formula

Consists of 4 and the primorials (A002110).
a(1) = 2, a(2) = 4, a(3) = 6, a(n+1)/a(n) = Prime[n] for n>2.

Extensions

Corrected and extended by Alexander Adamchuk, Aug 11 2006
Definition corrected and clarified by Jonathan Sondow, Aug 16 2011

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 *)

A086979 Increasing peaks in the prime gap sequence A038664.

Original entry on oeis.org

46, 282, 738, 3302, 7970, 8028, 14862, 15783, 34202, 44773, 44903, 85787, 110224, 165326, 402884, 460883, 474029, 786922, 887313, 2959782, 4875380, 8321465, 9330121, 20226285, 45808557, 92276646, 114867712, 201745031, 265878477
Offset: 1

Views

Author

Harry J. Smith, Jul 26 2003

Keywords

Comments

a(n) is Pi(p_k), the number of primes up to and including p_k, where p_k is the initial prime of a prime gap g = p_k+1 - p_k. All even gaps smaller than g occur at a smaller prime and the next even gap g+2 also occurs earlier.

Examples

			282 is in this list because the 282nd prime is 1831, 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

A086980 Late occurring prime gaps in the prime gap sequence A001223.

Original entry on oeis.org

12, 16, 32, 38, 46, 56, 66, 70, 74, 80, 88, 94, 102, 108, 116, 124, 134, 144, 150, 158, 166, 186, 194, 200, 228, 256, 264, 278, 294, 298, 316, 328, 334, 362, 370, 388, 422, 436, 442, 452, 466, 472, 482, 488, 510, 520, 536, 568, 576, 580, 590, 608, 628, 632
Offset: 1

Views

Author

Harry J. Smith, Jul 26 2003

Keywords

Comments

a(n) is the gap g = p_k+1 - p_k between consecutive primes with all even gaps smaller than g occurring at a smaller prime and the next even gap g+2 also occurring earlier.

Examples

			16 is in this list because the first time a prime gap of 16 occurs is between consecutive primes 1831 and 1847. All even prime gaps less than 16 occur for a smaller prime. The next even prime gap of 18 also occurs earlier.
		

References

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

Crossrefs

A362465 a(n) is the least number of 2 or more consecutive signed primes whose sum equals n.

Original entry on oeis.org

3, 2, 2, 4, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3
Offset: 0

Views

Author

Karl-Heinz Hofmann, Apr 21 2023

Keywords

Comments

Inspired by a conjecture made by Carlos Rivera in 2000 (see link). Here we remove Rivera's restriction that the primes have to be smaller than n.
For every positive even n, a(n) = 2, provided there are 2 consecutive primes separated by a gap of size n. Polignac's conjecture says: "For any positive even number n, there are infinitely many prime gaps of size n." If so, a(3) is the only 4 in this sequence, as any even number of consecutive odd signed primes has an even sum.
There is also the reversed sequence for negative n with 0 as the symmetry point.
See A362466 for the first occurrences of numbers in this sequence.

Examples

			a(1) = 2: -2 + 3 = 1.
a(0) = 3: -2 - 3 + 5 = 0.
a(3) = 4:  2 + 3 + 5 - 7 = 3.
The example below for a(29) gives more detail of the general method employed.
a(29) = 5:  3 - 5 + 7 + 11 + 13 = 29.
Since any even number of consecutive odd signed primes has an even sum, we can show a(29) <> 4.
A test with all triples of consecutive signed primes up to 10^9 gave no solution for 29. The estimated lower bound for the permutation p1 + p2 - p3 is p1 - (p1 + 2)^0.525 and was never surpassed. (See Wikipedia link. "A result, due to Baker, Harman and Pintz in 2001, shows that Theta may be taken to be 0.525".) So the terms are calculated with the assumption that this is true.
		

Crossrefs

Cf. A000230, A001632, A362466 (first occurrences).

Programs

  • Python
    from sympy import primepi, sieve as prime
    import numpy
    upto = 50000                   # 5000000 good for 8 GB RAM (3 Minutes)
    primepi_of_upto, np, arr = primepi(upto), 1, []
    A362465 = numpy.zeros(upto + 1, dtype="i4")
    A362465[2:][::2] = 2           # holds if "upto" < 7 * 10^7
    for n in range(1,primepi_of_upto + 1): arr.append([prime[n]])
    while all(A362465) == 0:
        np += 1
        for k in range(0,primepi_of_upto):
            temp = []
            for i in arr[k]:
                temp.append(i + prime[k+np])
                temp.append(abs(i - prime[k+np]))
            arr[k] = set(temp)
            for n in temp:
                if n <= upto and A362465[n] == 0: A362465[n] = np
    print(list(A362465[0:100]))

Formula

a(n) = a(-n).

Extensions

Edited by Peter Munn, Aug 08 2023

A182875 Least Ramanujan prime having a gap of 2n to the previous Ramanujan prime.

Original entry on oeis.org

151, 71, 17, 67, 419, 29, 1987, 167, 367, 127, 149, 881, 97, 401, 1217, 5689, 641, 347, 1861, 809, 719, 1777, 227, 1151, 1423, 23819, 1663, 937, 6761, 1973, 14143, 3761, 569, 4327, 3251, 4201, 33703, 29009, 3449, 9319, 5639, 10427, 2617, 6659, 2999, 9613, 20327, 13997, 31957, 3167
Offset: 1

Views

Author

T. D. Noe, Dec 09 2010

Keywords

Crossrefs

Cf. A001632 (least prime ending a gap of 2n)

Formula

a(n) = A182874(n) + 2n.

A333200 Rectangular array read by antidiagonals: row n shows the primes p(k) such that p(k) = p(k-1) + 2n, with 2 prefixed to row 1.

Original entry on oeis.org

2, 3, 11, 5, 17, 29, 7, 23, 37, 97, 13, 41, 53, 367, 149, 19, 47, 59, 397, 191, 211, 31, 71, 67, 409, 251, 223, 127, 43, 83, 79, 457, 293, 479, 307, 1847, 61, 101, 89, 487, 347, 521, 331, 1949, 541, 73, 107, 137, 499, 419, 631, 787, 2129, 1087, 907, 103, 113
Offset: 1

Views

Author

Clark Kimberling, May 09 2020

Keywords

Comments

Every prime occurs exactly once.
Row 1: A001632, except for initial term
Row 2: A046132
Row 3: A031925
Row 4: A031927
Row 5: A031929
Column 1: A006512, beginning with 5,7,13

Examples

			Northwest corner:
    2   3     5    7   13   19   31   43   61   73  103
   11   17   23   41   47   71   83  101  107  113  131
   29   37   53   59   67   79   89  137  157  163  173
   97  367  397  409  457  487  499  691  709  727  751
  149  191  251  293  347  419  431  557  587  641  701
		

Crossrefs

Programs

  • Mathematica
    z = 2700; p = Prime[Range[z]];
    r[n_] := Select[Range[z], p[[#]] - p[[# - 1]] == 2 n &]; r[1] = Join[{1, 2}, r[1]];
    TableForm[Table[Prime[r[n]], {n, 1, 18}]]  (* A333200, array *)
    TableForm[Table[r[n], {n, 1, 18}]] (* A333201, array *)
    Table[Prime[r[n - k + 1][[k]]], {n, 12}, {k, n, 1, -1}] // Flatten (* A333200, sequence *)
    Table[r[n - k + 1][[k]], {n, 12}, {k, n, 1, -1}] // Flatten (* A333201, sequence *)
Showing 1-10 of 12 results. Next