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

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

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

%I

%S 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,

%T 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,

%U 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

%N Number of terms in longest arithmetic progression of consecutive primes starting at n-th prime (conjectured to be unbounded).

%C a(n) <= 4 for n <= 10^5. - _Reinhard Zumkeller_, Feb 02 2007

%C 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. [From Harvey P. Dale, Jul 13 2011]

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

%H R. Zumkeller, <a href="/A031217/b031217.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Pri#primes_AP">Index entries for sequences related to primes in arithmetic progressions</a>

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

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

%o (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

%Y Cf. A001223.

%K nonn,easy,nice

%O 1,1

%A _N. J. A. Sloane_.

%E More terms from _James A. Sellers_

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

Content is available under The OEIS End-User License Agreement .

Last modified November 24 04:08 EST 2014. Contains 249867 sequences.