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.

Showing 1-6 of 6 results.

A091237 Lengths of runs in A039702.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 4, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 4, 1, 1, 1, 1, 2, 3, 7, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 3, 2, 2, 2, 1, 3, 4
Offset: 1

Views

Author

N. J. A. Sloane, Feb 22 2004

Keywords

Comments

Lengths of runs, where a run is a succession of primes that are congruent mod 4.
In other words, RUNS transform of A039702. If the two initial 1's are omitted, this is the RUNS transform of A100672. - N. J. A. Sloane, Jan 11 2025

Crossrefs

Programs

  • Mathematica
    Most[Length /@ Split[Table[Mod[Prime[n], 4], {n, 200}]]] (* T. D. Noe, Sep 21 2012 *)

Extensions

More terms from David Wasserman, Feb 28 2006

A091295 (Number of primes == 3 mod 4 less than 10^n) - (number of primes == 1 mod 4 less than 10^n).

Original entry on oeis.org

1, 2, 7, 10, 25, 147, 218, 446, 551, 5960, 14252, 63337, 118472, 183457, 951700, 3458334, 6284060, 2581691, 80743228, 259753425
Offset: 1

Views

Author

Enoch Haga, Feb 23 2004

Keywords

Examples

			a(1) = 1 because below 10^1 3 and 7 are 3 mod 4 and 5 is 1 mod 4 and the difference is 2-1=1.
		

References

  • Hans Riesel, Prime Numbers and Computer Methods for Factorization, 2nd ed., Birkhauser, The distribution of primes between the two series 4n+1 and 4n+3, pages 73-77, with graphs.

Crossrefs

Formula

a(n) = A091099(n) - A091098(n) = A093153(n) + 1. [Max Alekseyev, May 17 2009]

Extensions

a(17)-a(20) from Marc Deleglise, Jun 28 2007

A145989 Run lengths of consecutive primes == 1 (mod 4) where the run length is at least 2.

Original entry on oeis.org

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, 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
Offset: 1

Views

Author

Enoch Haga, Oct 26 2008

Keywords

Comments

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
The maximum run length in the first 1000 terms is 9. - Harvey P. Dale, Jul 27 2025

Examples

			a(1)=2 because this sequence includes consecutive runs of any length and this first occurrence > 1 is a run of 2.
		

References

  • Enoch Haga, Exploring Primes on Your PC and the Internet, 1994-2007. Pp. 30-31. ISBN 978-1-885794-24-6

Crossrefs

Programs

  • Mathematica
    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 *)
  • UBASIC
    10 'cluster primes
    20 C=1
    30 input "end #";L
    40 for N=3 to L step 2
    50 S=int(sqrt(N))
    60 for A=3 to S step 2
    70 B=N/A
    80 if int(B)*A=N then cancel for:goto 170
    90 next A
    100 C=C+1
    110 E=N/4:E=int(E):R=N-(4*E)
    120 if R=1 then print N;:C1=C1+1:T1=T1+1:print T1
    130 if R=3 then T1=0
    140 if R=3 then print " ";N;:C3=C3+1:T2=T2+1:print T2
    150 if R=1 then T2=0
    160 if T1>10 or T2>10 then stop
    170 next
    180 print "Total primes=";C;:print "Type A";C1;"Type B";C3

A091267 Lengths of runs of 3's in A039702.

Original entry on oeis.org

1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 7, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 1, 1, 2, 1, 2, 5, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 3, 2, 2, 5, 5, 1, 1, 1, 2, 1, 1, 1, 1, 2, 4, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 1, 1, 3, 4, 1
Offset: 1

Views

Author

Enoch Haga, Feb 22 2004

Keywords

Comments

Number of primes congruent to 3 mod 4 in sequence before interruption by a prime 1 mod 4.

Examples

			a(16)=4 because this is the sequence of primes congruent to 3 mod 4: 199, 211, 223, 227. The next prime is 229, a prime 1 mod 4.
		

References

  • Enoch Haga, Exploring prime numbers on your PC and the Internet with directions to prime number sites on the Internet, 2001, pages 30-31. ISBN 1-885794-17-7.

Crossrefs

Programs

  • Mathematica
    t = Length /@ Split[Table[Mod[Prime[n], 4], {n, 2, 400}]]; Most[Transpose[Partition[t, 2]][[1]]] (* T. D. Noe, Sep 21 2012 *)

Formula

Count primes congruent to 3 mod 4 in sequence before interruption by a prime divided by 4 with remainder 1.

A092636 Number of consecutive prime runs of 1 prime congruent to 1 mod 4 below 10^n.

Original entry on oeis.org

1, 5, 31, 208, 1555, 12465, 102704, 869060, 7540342, 66571720, 595513442
Offset: 1

Views

Author

Enoch Haga, Mar 02 2004

Keywords

Examples

			a(3)=31 because 31 single primes occur below 10^3, each interrupted in the run by a prime congruent to 3 mod 4.
		

Crossrefs

Programs

  • Mathematica
    A002144 = Select[4 Range[0, 10^4] + 1, PrimeQ[#] &];
    A002145 = Select[4 Range[0, 10^4] + 3, PrimeQ[#] &];
    lst = {}; Do[If[Length[s = Select[A002144, Between[{A002145[[i]], A002145[[i + 1]]}]]] == 1, AppendTo[lst, Last[s]]], {i, Length[A002145] - 1}]; Table[Count[lst, x_ /; x < 10^n], {n, 4}]  (* Robert Price, May 31 2019 *)
  • PARI
    a(n)=my(p=2,q=3,t);forprime(r=5,nextprime(10^n),if(q%4==1&&p%4==3&&r%4==3,t++);p=q;q=r);t \\ Charles R Greathouse IV, Sep 30 2011

Formula

Generate the prime sequence with primes labeled 1 mod 4 or 3 mod 4. Add count of primes to sequence if just one prime occurs before interruption by a prime congruent to 3 mod 4.

Extensions

a(9) from Charles R Greathouse IV, Sep 30 2011
a(10)-a(11) from Chai Wah Wu, Mar 18 2018

A092637 Number of consecutive prime runs of 1 prime congruent to 3 mod 4 below 10^n.

Original entry on oeis.org

1, 3, 28, 217, 1570, 12515, 102942, 867677, 7541800, 66571277, 595524791
Offset: 1

Views

Author

Enoch Haga, Mar 02 2004

Keywords

Examples

			a(3)=28 because 28 single primes occur below 10^3, each interrupted in the run by a prime congruent to 1 mod 4.
		

Crossrefs

Programs

  • Mathematica
    A002144 = Join[{0}, Select[4 Range[0, 10^4] + 1, PrimeQ[#] &]];
    A002145 = Select[4 Range[0, 10^4] + 3, PrimeQ[#] &];
    lst = {}; Do[If[Length[s = Select[A002145, Between[{A002144[[i]], A002144[[i + 1]]}]]] == 1, AppendTo[lst, Last[s]]], {i, Length[A002144] - 1}]; Table[Count[lst, x_ /; x < 10^n], {n, 4}]  (* Robert Price, May 31 2019 *)

Formula

Generate the prime sequence with primes labeled 1 mod 4 or 3 mod 4. Add count of primes to sequence if just one prime occurs before interruption by a prime congruent to 1 mod 4.

Extensions

a(9)-a(11) from Chai Wah Wu, Mar 18 2018
Showing 1-6 of 6 results.