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.
%I A247384 #48 Jul 02 2017 13:36:25 %S A247384 97,11,3,23,47,167,131,2011,233,23633,34499,1013,9341,90659,521,51749, %T A247384 505049,1391087,2264839,2556713,17123893,2569529,15090641,18246451, %U A247384 6160043,1557431471,43679609,198572029,701575297,5552898499,6639843979,61233611783,9005520203 %N A247384 Find the first (maximal) string of consecutive primes of length exactly n which alternate between 4*k+1 and 4*k+3 or 4*k+3 and 4*k+1 as in A002144(4*n+1) and A002145(4*n+3). The first element is a(n). %H A247384 Jens Kruse Andersen and Giovanni Resta, <a href="/A247384/b247384.txt">Table of n, a(n) for n = 1..45</a> (first 38 terms from Jens Kruse Andersen) %H A247384 Jens Kruse Andersen, <a href="http://primerecords.dk/congruent-primes.htm">Consecutive Congruent Primes</a> %F A247384 a(n) = A289118(n) if and only if n > 1 and A289118(n) < A289118(n+1). - _Jonathan Sondow_, Jun 27 2017 %e A247384 a(4)=23 because 23,29,31,37 alternate 4*n+3,4*n+1,4*n+3,4*n+1 for exactly four primes and 23 is the least prime for a string of exactly four. %p A247384 Primes:= select(isprime,[seq(2*i+1,i=1..10^7)]): %p A247384 Pm4:= map(`modp`,[seq((-1)^j*Primes[j],j=1..nops(Primes))],4): %p A247384 Starts:= [1,op(select(t -> Pm4[t-1]<> Pm4[t], [$2..nops(Pm4)]))]: %p A247384 Lengths:= [seq(Starts[i+1]-Starts[i],i=1..nops(Starts)-1)]: %p A247384 for i from 1 to max(Lengths) do A[i]:= ListTools:-Search(i,Lengths) od: %p A247384 R:=[seq(A[i],i=1..max(Lengths))]: %p A247384 seq(`if`(a=0,0,Primes[Starts[a]]),a=R); # _Robert Israel_, Sep 15 2014 %t A247384 i = 2; While[ Mod[ Prime[i] - Prime[i - 1], 4] != 0 || Mod[ Prime[i + 1] - Prime[i], 4] != 0, i++]; T = {Prime[i]}; Do[j = 2; While[! (Product[ Mod[ Prime[k + 1] - Prime[k], 4], {k, j, j + n}] != 0 && (Mod[Prime[j] - Prime[j - 1], 4] == 0 || j == 2) && Mod[ Prime[j + n + 2] - Prime[j + n + 1], 4] == 0), j++]; T = Append[T, Prime[j]], {n, 0, 13}]; T (* _Jonathan Sondow_, Jun 28 2017 *) %o A247384 (PARI) v=vector(100);v[1]=7;cur=1;p=3;forprime(q=5, 1e10, if((q-p)%4==0,if(!v[cur],v[cur]=back(p,cur);print("a("cur") = "v[cur]));cur=1,cur++);p=q) \\ _Charles R Greathouse IV_, Sep 15 2014 %Y A247384 Cf. A002144, A002145, A098058, A098059, A289118, A289237. %K A247384 nonn %O A247384 1,1 %A A247384 _J. M. Bergot_, Sep 15 2014 %E A247384 More terms from _Jens Kruse Andersen_, Oct 01 2014 %E A247384 Definition clarified by _Jonathan Sondow_, Jun 25 2017