OFFSET
1,1
COMMENTS
By a theorem of Shiu, a(n) exists for all n.
LINKS
D. K. L. Shiu, Strings of Congruent Primes, J. Lond. Math. Soc. 61 (2) (2000) 359-373 [MR1760689]
MATHEMATICA
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}]
PROG
(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
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
T. D. Noe, Dec 02 2009
STATUS
approved