cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A168678 #7 Aug 30 2015 10:03:51
%S A168678 3,31,22501,9984437
%N A168678 Least prime p such that the prime(n)-1 consecutive primes starting at p are all congruent to 1 (mod prime(n)).
%C A168678 By a theorem of Shiu, a(n) exists for all n.
%H A168678 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 A168678 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 A168678 (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 A168678 Cf. A111287.
%K A168678 hard,nonn
%O A168678 1,1
%A A168678 _T. D. Noe_, Dec 02 2009