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-7 of 7 results.

A005115 Let i, i+d, i+2d, ..., i+(n-1)d be an n-term arithmetic progression of primes; choose the one which minimizes the last term; then a(n) = last term i+(n-1)d.

Original entry on oeis.org

2, 3, 7, 23, 29, 157, 907, 1669, 1879, 2089, 249037, 262897, 725663, 36850999, 173471351, 198793279, 4827507229, 17010526363, 83547839407, 572945039351, 6269243827111
Offset: 1

Views

Author

Keywords

Comments

In other words, smallest prime which is at the end of an arithmetic progression of n primes.
For the corresponding values of the first term and the common difference, see A113827 and A093364. For the actual arithmetic progressions, see A133277.
One may also minimize the common difference: this leads to A033189, A033188 and A113872.
One may also specify that the first term is the n-th prime and then minimize the common difference (or, equally, the last term): this leads to A088430 and A113834.
One may also ask for n consecutive primes in arithmetic progression: this gives A006560.

Examples

			n, AP, last term
1 2 2
2 2+j 3
3 3+2j 7
4 5+6j 23
5 5+6j 29
6 7+30j 157
7 7+150j 907
8 199+210j 1669
9 199+210j 1879
10 199+210j 2089
11 110437+13860j 249037
12 110437+13860j 262897
..........................
a(11)=249037 since 110437,124297,...,235177,249037 is an arithmetic progression of 11 primes ending with 249037 and it is the least number with this property.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A5.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

For the associated gaps, see A093364. For the initial terms, see A113827. For the arithmetic progressions, see A133277.

Programs

  • Mathematica
    (* This program will generate the 4 to 12 terms to use a[n_] to generate term 13 or higher, it will have a prolonged run time. *) a[n_] := Module[{i, p, found, j, df, k}, i = 1; While[i++; p = Prime[i]; found = 0; j = 0; While[j++; df = 6*j; (p > ((n - 1)*df)) && (found == 0), found = 1; Do[If[! PrimeQ[p - k*df], found = 0], {k, 1, n - 1}]]; found == 0]; p]; Table[a[i], {i, 4, 12}]

Formula

Green & Tao prove that this sequence is infinite, and further a(n) < 2^2^2^2^2^2^2^2^O(n). Granville conjectures that a(n) <= n! + 1 for n >= 3 and give a heuristic suggesting a(n) is around (exp(1-gamma) n/2)^(n/2). - Charles R Greathouse IV, Feb 26 2013

Extensions

a(11)-a(13) from Michael Somos, Mar 14 2004
a(14) and corrected version of a(7) from Hugo Pfoertner, Apr 27 2004
a(15)-a(17) from Don Reble, Apr 27 2004
a(18)-a(21) from Granville's paper, Jan 26 2006
Entry revised by N. J. A. Sloane, Jan 26 2006, Oct 17 2007

A088430 a(n) = the least positive d such that for p=prime(n), the numbers p+0d, p+1d, p+2d, ..., p+(p-1)d are all primes.

Original entry on oeis.org

1, 2, 6, 150, 1536160080, 9918821194590, 341976204789992332560, 2166703103992332274919550
Offset: 1

Views

Author

Zak Seidov, Sep 30 2003

Keywords

Comments

Problem discussed by Russell E. Rierson: starting with given p, find the least d such that the arithmetic progression p,p+d,p+2d,... contains only primes. Obviously, the maximum number of prime terms is p and to reach that maximum, d must be a multiple of all smaller primes. For example, a(5) is a multiple of 2*3*5*7.
There can be other maximum-length prime progressions starting at p, with larger d. (Zak Seidov found d=4911773580 for p=11.)

Examples

			n AP Last term
--------------
1 2+i 3
2 3+2*i 7
3 5+6*i 29
4 7+150*i 907
5 11+1536160080*i 15361600811
6 13+9918821194590*i 119025854335093
7 17+341976204789992332560*i 5471619276639877320977
8 19+2166703103992332274919550*i 39000655871861980948551919
		

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 139-140.

Crossrefs

See A113834 for last term in the progression, and A231017 for the 2nd term.

Programs

  • Mathematica
    A088430[n_] := Module[{p, m, d},
       p = Prime[n]; m = Product[Prime[i], {i, 1, n - 1}];
       d = m;
       While[! AllTrue[Table[p + i*d, {i, 1, p - 1}], PrimeQ], d = d + m];
       Return[d];
       ];
    Table[A088430[n], {n, 1, 8}] (* Robert Price, Mar 27 2019 *)

Formula

a(n) = A231017(n) - prime(n). - Jonathan Sondow, Nov 08 2013
a(n) = A061558(prime(n)). - Jens Kruse Andersen, Jun 30 2014
a(n) = A002110(n-1) * A231018(n). - Jeppe Stig Nielsen, Mar 16 2016

Extensions

Edited by Don Reble, Oct 04 2003
a(7) was found by Phil Carmody. - Don Reble, Nov 23 2003
Entry revised by N. J. A. Sloane, Jan 25 2006
a(8) found by Wojciech Izykowski. - Jens Kruse Andersen, Jun 30 2014

A113832 Triangle read by rows: row n (n>=2) gives a set of n primes with the property that the pairwise averages are all primes, having the smallest largest element.

Original entry on oeis.org

3, 7, 3, 7, 19, 3, 11, 23, 71, 5, 29, 53, 89, 113, 3, 11, 83, 131, 251, 383, 5, 29, 113, 269, 353, 449, 509, 5, 17, 41, 101, 257, 521, 761, 881, 23, 431, 503, 683, 863, 1091, 1523, 1871, 2963, 31, 1123, 1471, 1723, 3463, 3571, 4651, 5563, 5743, 6991
Offset: 2

Views

Author

N. J. A. Sloane, Jan 25 2006

Keywords

Comments

If there is more than one set with the same smallest last element, choose the lexicographically earliest solution.
For distinct primes, the solution for n=5 is {5, 29, 53, 89, 173}.

Examples

			Triangle begins:
3, 7
3, 7, 19
3, 11, 23, 71
5, 29, 53, 89, 113
3, 11, 83, 131, 251, 383
5, 29, 113, 269, 353, 449, 509
The set of primes generated by {5, 29, 53, 89, 113} is {17, 29, 41, 47, 59, 59, 71, 71, 83, 101}.
		

References

  • Antal Balog, The prime k-tuplets conjecture on average, in "Analytic Number Theory" (eds. B. C. Berndt et al.) Birkhäuser, Boston, 1990, pp. 165-204. [Background]

Crossrefs

See A115631 for the case when all pairwise averages are distinct primes.

Extensions

More terms from T. D. Noe, Feb 01 2006

A231017 Least prime q > p = prime(n) such that if d = q-p, then p, p+d, p+2d, ..., p+(p-1)d are all primes.

Original entry on oeis.org

3, 5, 11, 157, 1536160091, 9918821194603, 341976204789992332577, 2166703103992332274919569
Offset: 1

Views

Author

Jonathan Sondow, Nov 08 2013

Keywords

Comments

Second term in the smallest non-constant p-term arithmetic progression (AP) of primes beginning with p = prime(n).
For any non-constant AP beginning with a prime p and ending with a prime, the maximum possible length is p, since p+pd is not prime for d > 0. If all the terms are prime, then the common difference d must be a multiple of all primes < p.
Ribenboim says that in 1986 G. Loh [Loeh] discovered a(5) and a(6), and that a(n) should exist for all n, but "in my opinion, this is so difficult that no one will prove [it], and no one will find a counterexample in the near future."
Phil Carmody found a(7) in 2001.
See the crossrefs for more comments, references, and links.

Examples

			Prime(3) = 5 and 5, 11, 17, 23, 29 is the smallest 5-term AP beginning with 5, so a(3) = 11.
		

References

  • P. Ribenboim, My Numbers, My Friends, Springer, 2000; p. 67.
  • P. Ribenboim, The Book of Prime Number Records, 2nd ed., Springer, 1989; p. 225.

Crossrefs

For common differences see A088430, for initial terms see A000040, for last terms see A113834, for the APs see A231406.
For other types of APs of primes see A005115 and its comments.

Programs

  • PARI
    a(n)=my(p=prime(n),P=prod(i=1,n-1,prime(i)),d); forprime(q=p+1,, d=q-p; if(d%P,next); for(i=2,p-1,if(!isprime(p+i*d), next(2))); return(q)) \\ Charles R Greathouse IV, Nov 08 2013

Formula

a(n) = prime(n) + A088430(n) = prime(n) + A002110(n)*A231018(n).

Extensions

a(8) found by Wojciech Izykowski, from Jens Kruse Andersen, Jun 30 2014

A231406 Table read by rows, with n-th row the smallest non-constant p-term arithmetic progression of primes beginning with p = prime(n).

Original entry on oeis.org

2, 3, 3, 5, 7, 5, 11, 17, 23, 29, 7, 157, 307, 457, 607, 757, 907, 11, 1536160091, 3072320171, 4608480251, 6144640331, 7680800411, 9216960491, 10753120571, 12289280651, 13825440731, 15361600811, 13, 9918821194603, 19837642389193, 29756463583783, 39675284778373, 49594105972963, 59512927167553, 69431748362143, 79350569556733, 89269390751323, 99188211945913, 109107033140503, 119025854335093, 17, 341976204789992332577
Offset: 1

Views

Author

Jonathan Sondow, Nov 08 2013

Keywords

Comments

For comments, references, and links, see the crossrefs.

Examples

			Triangle begins:
2 3
3 5 7
5 11 17 23 29
7 157 307 457 607 757 907
11 1536160091 3072320171 4608480251 6144640331 7680800411 9216960491 10753120571 12289280651 13825440731 15361600811
		

Crossrefs

For common differences see A088430, for initial terms see A000040, for 2nd terms see A231017, for last terms see A113834.

Formula

T(n,k) = prime(n) + k*A088430(n), 0 <= k < prime(n), n > 0.

A113833 Triangle read by rows: row n (n>=2) gives a set of n primes such that the averages of all subsets are distinct primes, having the smallest largest element.

Original entry on oeis.org

3, 7, 7, 19, 67, 5, 17, 89, 1277, 209173, 322573, 536773, 1217893, 2484733
Offset: 2

Views

Author

N. J. A. Sloane, Jan 25 2006

Keywords

Comments

If there is more than one set with the same smallest last element, choose the lexicographically earliest solution.
Note that, in each row, the n primes are equal modulo 4, 12, 12 and 120, respectively. - Row 5 from T. D. Noe, Aug 08 2006

Examples

			Triangle begins:
3, 7
7, 19, 67
5, 17, 89, 1277
		

References

  • Antal Balog, The prime k-tuplets conjecture on average, in "Analytic Number Theory" (eds. B. C. Berndt et al.) Birkhäuser, Boston, 1990, pp. 165-204. [Background]

Crossrefs

Extensions

Row 5 from T. D. Noe, Aug 08 2006

A158256 Values of d in AP 11+210*d*i, i=0..10, with 11 primes.

Original entry on oeis.org

7315048, 23389398, 368453046, 397698469, 476527246, 716025940, 1428738103, 1517391167, 1761057635, 1796879220, 2436613965, 2762038441, 3041254151, 3340639523, 3551566265, 3698215410, 4207031185, 4407805122, 4556491589, 5072158298, 5626167378, 5986324571, 7430871116, 8023346435, 8172201108, 8457933834, 10733118467
Offset: 1

Views

Author

Zak Seidov, Mar 15 2009

Keywords

Crossrefs

Showing 1-7 of 7 results.