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-2 of 2 results.

A087011 Number of primes of form 4*k+3 between n and 2n (inclusive).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 8, 8, 7, 7, 8, 8, 7, 7, 7, 7, 8, 8, 8, 8, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11
Offset: 1

Views

Author

Jason Earls, Jul 30 2003

Keywords

Comments

Erdős proved that between any n > 7 and its double there are always at least two primes, one of form 4*k+1 and one of form 4*k+3.

References

  • B. Schechter, "My Brain is Open: The Mathematical Journeys of Paul Erdős," Simon & Schuster, New York, 1998, p. 62.

Crossrefs

Programs

  • Magma
    [#[p:p in PrimesInInterval(n,2*n)| p mod 4 eq 3]:n in [1..100]]; // Marius A. Burtea, Dec 16 2019
  • Mathematica
    a[n_] := Module[{c = 0}, Do[If[Mod[k, 4] == 3 && PrimeQ[k], c++], {k, n, 2 n}]; c]; Array[a, 100] (* Amiram Eldar, Dec 16 2019 *)

A087012 Numbers m such that the number of primes of form 4*k+1 between m and 2*m equals the number of primes of form 4*k+3 between m and 2*m (inclusive).

Original entry on oeis.org

1, 3, 4, 5, 8, 10, 11, 12, 13, 15, 20, 22, 23, 24, 25, 26, 31, 34, 35, 37, 49, 50, 52, 53, 57, 58, 59, 62, 63, 69, 72, 73, 75, 79, 82, 83, 84, 85, 86, 91, 92, 93, 94, 95, 97, 99, 141, 147, 148, 149, 152, 153, 164, 165, 168, 175, 176, 182, 183, 187, 188, 189, 200, 244, 245
Offset: 1

Views

Author

Jason Earls, Jul 30 2003

Keywords

Crossrefs

Programs

  • Magma
    f:=func; [k:k in [1..250]|f(k,1) eq f(k,3)]; // Marius A. Burtea, Dec 16 2019
  • Mathematica
    seqQ[n_] := Module[{c1 = 0, c3 = 0}, Do[If[Mod[k, 4] == 1 && PrimeQ[k], c1++]; If[Mod[k, 4] == 3 && PrimeQ[k], c3++], {k, n, 2 n}]; c1 == c3]; Select[Range[250], seqQ] (* Amiram Eldar, Dec 16 2019 *)
    npfQ[n_]:=With[{prs=Select[Range[n,2n],PrimeQ]},Length[Select[prs,Mod[#,4]==1&]]==Length[Select[prs,Mod[#,4]==3&]]]; Select[ Range[ 250],npfQ] (* Harvey P. Dale, Sep 25 2024 *)
  • PARI
    for(m=1,250,my(k1=0,k3=0);forprime(p=m,2*m,if(p%4==1,k1++);if(p%4==3,k3++));if(k1==k3,print1(m," "))) \\ Hugo Pfoertner, Dec 16 2019
    
Showing 1-2 of 2 results.