login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A031217 Number of terms in longest arithmetic progression of consecutive primes starting at n-th prime (conjectured to be unbounded). 1
2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n) <= 4 for n <= 10^5. - Reinhard Zumkeller, Feb 02 2007

The first instance of 4 consecutive primes in an arithmetic progression is (251, 257, 263, 269), which starts with the 54th prime.  The first instance of 5 consecutive primes in an arithmetic progression is (9843019, 9843049, 9843079, 9843109, 9843139), which starts with the 654926th prime. [Harvey P. Dale, Jul 13 2011]

REFERENCES

R. K. Guy, Unsolved Problems in Number Theory, A6.

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..10000

Index entries for sequences related to primes in arithmetic progressions

EXAMPLE

At 47 there are 3 consecutive primes in A.P., 47 53 59.

MATHEMATICA

max = 5; a[n_] := Catch[pp = NestList[ NextPrime, Prime[n], max-1]; Do[ If[ Length[ Union[ Differences[pp[[1 ;; -k]] ] ] ] == 1, Throw[max-k+1]], {k, 1, max-1}]]; Table[a[n], {n, 1, 105}] (* Jean-Fran├žois Alcover, Jul 17 2012 *)

PROG

(PARI) a(n)=my(p=prime(n), q=nextprime(p+1), g=q-p, k=2); while(nextprime(q+1)==q+g, q+=g; k++); k \\ Charles R Greathouse IV, Jun 20 2013

CROSSREFS

Cf. A001223.

Sequence in context: A090387 A030329 A120881 * A111497 A220554 A208243

Adjacent sequences:  A031214 A031215 A031216 * A031218 A031219 A031220

KEYWORD

nonn,easy,nice,changed

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from James A. Sellers

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 11 03:18 EST 2016. Contains 279034 sequences.