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 A145989 #14 Jul 27 2025 11:38:10 %S A145989 2,2,3,2,2,2,2,2,2,4,3,2,2,3,2,4,2,2,2,3,3,2,2,4,2,2,2,2,2,2,2,2,2,3, %T A145989 2,2,2,2,2,2,2,2,2,2,2,3,3,3,2,2,2,2,5,2,3,2,2,2,2,2 %N A145989 Run lengths of consecutive primes == 1 (mod 4) where the run length is at least 2. %C A145989 The run lengths of 1's in A039702 are 1, 2, 1, 2, 1, 1, 1, 3,.. as listed in A091318. Deleting all 1's from A091318 generates this sequence here. - R. J. mathar, Sep 30 2011 %C A145989 The maximum run length in the first 1000 terms is 9. - _Harvey P. Dale_, Jul 27 2025 %D A145989 Enoch Haga, Exploring Primes on Your PC and the Internet, 1994-2007. Pp. 30-31. ISBN 978-1-885794-24-6 %H A145989 Harvey P. Dale, <a href="/A145989/b145989.txt">Table of n, a(n) for n = 1..1000</a> %e A145989 a(1)=2 because this sequence includes consecutive runs of any length and this first occurrence > 1 is a run of 2. %t A145989 Length/@Select[Split[Table[If[Mod[p,4]==1,1,0],{p,Prime[Range[500]]}]],#[[1]]==1&&Length[#]>1&] (* _Harvey P. Dale_, Jul 27 2025 *) %o A145989 (UBASIC) %o A145989 10 'cluster primes %o A145989 20 C=1 %o A145989 30 input "end #";L %o A145989 40 for N=3 to L step 2 %o A145989 50 S=int(sqrt(N)) %o A145989 60 for A=3 to S step 2 %o A145989 70 B=N/A %o A145989 80 if int(B)*A=N then cancel for:goto 170 %o A145989 90 next A %o A145989 100 C=C+1 %o A145989 110 E=N/4:E=int(E):R=N-(4*E) %o A145989 120 if R=1 then print N;:C1=C1+1:T1=T1+1:print T1 %o A145989 130 if R=3 then T1=0 %o A145989 140 if R=3 then print " ";N;:C3=C3+1:T2=T2+1:print T2 %o A145989 150 if R=1 then T2=0 %o A145989 160 if T1>10 or T2>10 then stop %o A145989 170 next %o A145989 180 print "Total primes=";C;:print "Type A";C1;"Type B";C3 %Y A145989 Cf. A055623, A054624, A145986, A145988 - A145994. %K A145989 easy,nonn %O A145989 1,1 %A A145989 _Enoch Haga_, Oct 26 2008