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

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

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
Showing 1-2 of 2 results.