|
|
A168678
|
|
Least prime p such that the prime(n)-1 consecutive primes starting at p are all congruent to 1 (mod prime(n)).
|
|
2
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
By a theorem of Shiu, a(n) exists for all n.
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|