login
Least prime p such that the prime(n)-1 consecutive primes starting at p are all congruent to 1 (mod prime(n)).
2

%I #7 Aug 30 2015 10:03:51

%S 3,31,22501,9984437

%N Least prime p such that the prime(n)-1 consecutive primes starting at p are all congruent to 1 (mod prime(n)).

%C By a theorem of Shiu, a(n) exists for all n.

%H D. K. L. Shiu, <a href="http://dx.doi.org/10.1112/S0024610799007863">Strings of Congruent Primes</a>, J. Lond. Math. Soc. 61 (2) (2000) 359-373 [<a href="http://www.ams.org/mathscinet-getitem?mr=1760689">MR1760689</a>]

%t Table[p=Prime[n]; cnt=0; q=2; While[q=NextPrime[q]; If[Mod[q,p]==1, cnt++, cnt=0]; cnt<p-1]; If[p==2, q, NextPrime[q,-p+2]], {n,4}]

%o (PARI) A168678(n) = {local(p,m,c,r);p=2;r=2;m=prime(n);c=0;while(c<m-1,if(p%m==1,c++,c=0;r=nextprime(p+1));p=nextprime(p+1));r} \\ _Michael B. Porter_, Feb 02 2010

%Y Cf. A111287.

%K hard,nonn

%O 1,1

%A _T. D. Noe_, Dec 02 2009