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

A196667 The Chebyshev primes of index 1.

Original entry on oeis.org

109, 113, 139, 181, 197, 199, 241, 271, 281, 283, 293, 313, 317, 443, 449, 461, 463, 467, 479, 491, 503, 509, 523, 619, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 761, 769, 773, 829, 859, 863, 883, 887, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1091, 1093, 1097
Offset: 1

Views

Author

Michel Planat, Oct 05 2011

Keywords

Comments

The sequence consists of the odd prime numbers p that satisfy li[psi(p)]-li[psi(p-1)]<1, where li(x) is the logarithmic integral and psi(x) is the Chebyshev's psi function.

Crossrefs

Programs

  • Magma
    Mangoldt:=function(n);
    if #Factorization(n) eq 1 then return Log(Factorization(n)[1][1]); else return 0; end if;
    end function;
    tcheb:=function(n);
    x:=0;
    for i in [1..n] do
    x:=x+Mangoldt(i);
    end for;
    return(x);
    end function;
    jump1:=function(n);
    x:=LogIntegral(tcheb(NthPrime(n)))-LogIntegral(tcheb(NthPrime(n)-1));
    return x;
    end function;
    Set1:=[];
    for i in [2..1000] do
    if jump1(i)-1 lt 0 then Set1:=Append(Set1,NthPrime(i)); NthPrime(i); end if;
    end for;
    Set1;
    
  • Maple
    PlanatSole := proc(n,r) local j, p, pr, psi, L; L := NULL;
    psi := n -> add(log(i/ilcm(op(numtheory[divisors](i) minus {1,i}))),i=1..n);
    for j in [$3..n] do p := ithprime(j); pr := p^r;
    if evalf(Li(psi(pr))-Li(psi(pr-1))) < 1/r then L:= L,p fi od; L end:
    A196667 := n -> PlanatSole(n,1); # Peter Luschny, Oct 23 2011
  • Mathematica
    ChebyshevPsi[n_] := Log[LCM @@ Range[n]];
    Reap[Do[If[LogIntegral[ChebyshevPsi[p]] - LogIntegral[ChebyshevPsi[p - 1]] < 1, Sow[p]], {p, Prime[Range[2, 200]]}]][[2, 1]] (* Jean-François Alcover, Nov 17 2017, updated Dec 06 2018 *)
  • Perl
    use ntheory ":all"; forprimes { say if LogarithmicIntegral(chebyshev_psi($))-LogarithmicIntegral(chebyshev_psi($-1)) < 1 } 3,1000; # Dana Jacobsen, Dec 29 2015
  • Sage
    from mpmath import mp, mangoldt
    mp.dps = 25;
    def psi(n) :
        return sum(mangoldt(i) for i in (1..n))
    def PlanatSole(n,r) :
        P = Primes(); L = []
        for j in (2..n):
            p = P.unrank(j)
            pr = p^r
            if Li(psi(pr)) - Li(psi(pr-1)) < 1/r :
               L.append(p)
        return L
    def A196667List(n) : return PlanatSole(n,1)
    A196667List(100) # Peter Luschny, Oct 23 2011
    

A196669 The Chebyshev primes of index 3.

Original entry on oeis.org

11, 19, 29, 61, 71, 97, 101, 107, 109, 113, 127, 131, 149, 151, 173, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 257, 269, 281, 307, 311, 313, 317, 347, 349, 359, 373, 383, 389, 401, 409, 419, 421, 433, 439, 461, 479, 503, 509, 557, 563, 569, 571, 607
Offset: 1

Views

Author

Michel Planat, Oct 05 2011

Keywords

Comments

The sequence consists of such odd prime numbers p that satisfy li[psi(p^3)]-li[psi(p^3-1)]<1/3, where li(x) is the logarithmic integral and psi(x) is the Chebyshev's psi function.

Crossrefs

Programs

  • Magma
    Mangoldt:=function(n);
    if #Factorization(n) eq 1 then return Log(Factorization(n)[1][1]); else return 0; end if;
    end function;
    tcheb:=function(n);
    x:=0;
    for i in [1..n] do
    x:=x+Mangoldt(i);
    end for;
    return(x);
    end function;
    jump3:=function(n);
    x:=LogIntegral(tcheb(NthPrime(n)^3))-LogIntegral(tcheb(NthPrime(n)^3-1));
    return x;
    end function;
    Set3:=[];
    for i in [2..1000] do
    if jump3(i)-1/3 lt 0 then Set3:=Append(Set3,NthPrime(i)); NthPrime(i); end if;
    end for;
    Set3;
    
  • Maple
    # The function PlanatSole(n,r) is in A196667.
    A196669 := n -> PlanatSole(n,3); # Peter Luschny, Oct 23 2011
  • Mathematica
    ChebyshevPsi[n_] := Log[LCM @@ Range[n]];
    Reap[Do[If[LogIntegral[ChebyshevPsi[p^3]] - LogIntegral[ChebyshevPsi[p^3 - 1]] < 1/3, Print[p]; Sow[p]], {p, Prime[Range[2, 120]]}]][[2, 1]] (* Jean-François Alcover, Jul 14 2018, updated Dec 06 2018 *)
  • Perl
    use ntheory ":all"; forprimes { say if 3 * (LogarithmicIntegral(chebyshev_psi($**3)) - LogarithmicIntegral(chebyshev_psi($**3-1))) < 1 } 3, 1000; # Dana Jacobsen, Dec 29 2015
  • Sage
    def A196669(n) : return PlanatSole(n,3)
    # The function PlanatSole(n,r) is in A196667.
    # Peter Luschny, Oct 23 2011
    

Extensions

Corrected and extended by Dana Jacobsen, Dec 29 2015

A196670 The Chebyshev primes of index 4.

Original entry on oeis.org

5, 7, 17, 19, 31, 37, 41, 43, 53, 59, 67, 73, 79, 83, 101, 103, 107, 127, 131, 149, 157, 163, 179, 181, 197, 199, 211, 223, 227, 257, 269, 277, 281, 317, 331, 337, 347, 353, 379, 389, 419, 421, 439, 461, 463, 467, 479, 491, 499, 509, 541, 563, 569, 577, 617
Offset: 1

Views

Author

Michel Planat, Oct 05 2011

Keywords

Comments

The sequence consists of such odd prime numbers p that satisfy li(psi(p^4)) - li(psi(p^4-1)) < 1/4, where li(x) is the logarithmic integral and psi(x) is the Chebyshev psi function.

Crossrefs

Programs

  • Magma
    Mangoldt:=function(n);
    if #Factorization(n) eq 1 then return Log(Factorization(n)[1][1]); else return 0; end if;
    end function;
    tcheb:=function(n);
    x:=0;
    for i in [1..n] do
    x:=x+Mangoldt(i);
    end for;
    return(x);
    end function;
    jump4:=function(n);
    x:=LogIntegral(tcheb(NthPrime(n)^4))-LogIntegral(tcheb(NthPrime(n)^4-1));
    return x;
    end function;
    Set4:=[];
    for i in [2..1000] do
    if jump4(i)-1/4 lt 0 then Set4:=Append(Set4,NthPrime(i)); NthPrime(i); end if;
    end for;
    Set4;
    
  • Maple
    # The function PlanatSole(n,r) is in A196667.
    A196670 := n -> PlanatSole(n,4); # Peter Luschny, Oct 23 2011
  • Mathematica
    ChebyshevPsi[n_] := Log[LCM @@ Range[n]];
    Reap[Do[If[LogIntegral[ChebyshevPsi[p^4]] - LogIntegral[ChebyshevPsi[p^4 - 1]] < 1/4, Print[p]; Sow[p]], {p, Prime[Range[2, 120]]}]][[2, 1]] (* Jean-François Alcover, Jul 14 2018, updated Dec 06 2018 *)
  • Perl
    use ntheory ":all"; forprimes { say if 4 *(LogarithmicIntegral(chebyshev_psi($**4)) - LogarithmicIntegral(chebyshev_psi($**4-1))) < 1 } 3,100; # Dana Jacobsen, Dec 29 2015
  • Sage
    def A196670(n) : return PlanatSole(n,4)
    # The function PlanatSole(n,r) is in A196667.
    # Peter Luschny, Oct 23 2011
    

Extensions

More terms from Dana Jacobsen, Dec 29 2015

A197186 The Riemann primes of the psi type and index 2.

Original entry on oeis.org

2, 17, 31, 41, 53, 101, 109, 127, 139, 179, 397, 419, 547, 787, 997, 1031, 1229, 1801, 1811, 2099, 2237, 2417, 2423, 2657, 3163, 3203, 3517, 3581, 3583, 3931, 4241, 5503, 5507, 5557, 6079, 8087, 8719, 10433, 10487, 13399, 13411, 19309, 22303, 22307, 22613
Offset: 1

Views

Author

Michel Planat, Oct 11 2011

Keywords

Comments

The sequence consists of the prime numbers p that are champions (left to right maxima) of the function |psi(p^2)-p^2|, where psi(p) is the Chebyshev psi function.

Crossrefs

Programs

  • Mathematica
    ChebyshevPsi[n_] := Range[n] // MangoldtLambda // Total;
    Reap[For[max=0; p=2, p < 2000, p = NextPrime[p], f = Abs[ChebyshevPsi[p^2] - p^2]; If[f > max, max = f; Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Dec 03 2018 *)
  • Perl
    use ntheory ":all"; my($max,$f)=(0); forprimes { $f=abs(chebyshev_psi($**2)-$**2); if ($f > $max) { say; $max=$f; } } 10000; # Dana Jacobsen, Dec 29 2015

Extensions

More terms from Dana Jacobsen, Dec 29 2015

A197298 The Riemann primes of the theta type and index 2.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 59, 73, 97, 107, 109, 139, 179, 233, 263, 277, 283, 337, 347, 409, 419, 547, 643, 683, 809, 811, 821, 823, 863, 983, 991, 997, 1031, 1193
Offset: 1

Views

Author

Michel Planat, Oct 13 2011

Keywords

Comments

The sequence consists of the prime numbers p that are champions (left to right maxima) of the function |theta(p^2)-p^2|, where theta(p) is the Chebyshev theta function.

Crossrefs

Programs

  • Perl
    use ntheory ":all"; my($max,$f)=(0); forprimes { $f=abs(chebyshev_theta($**2)-$**2); if ($f > $max) { say; $max=$f; } } 10000; # Dana Jacobsen, Dec 29 2015
Showing 1-5 of 5 results.