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 A196667 #37 Sep 08 2022 08:45:59 %S A196667 109,113,139,181,197,199,241,271,281,283,293,313,317,443,449,461,463, %T A196667 467,479,491,503,509,523,619,643,647,653,659,661,673,677,683,691,701, %U A196667 761,769,773,829,859,863,883,887,1033,1039,1049,1051,1061,1063,1069,1091,1093,1097 %N A196667 The Chebyshev primes of index 1. %C A196667 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. %H A196667 Dana Jacobsen, <a href="/A196667/b196667.txt">Table of n, a(n) for n = 1..10000</a> %H A196667 M. Planat and P. Solé, <a href="http://arxiv.org/abs/1109.6489">Efficient prime counting and the Chebyshev primes</a> arXiv:1109.6489 [math.NT], 2011. %H A196667 L. Schoenfeld, <a href="http://dx.doi.org/10.1090/S0025-5718-1976-0457374-X">Sharper bounds for the Chebyshev functions theta(x) and psi(x). II</a>, Math. Comp. 30 (1975) 337-360. %p A196667 PlanatSole := proc(n,r) local j, p, pr, psi, L; L := NULL; %p A196667 psi := n -> add(log(i/ilcm(op(numtheory[divisors](i) minus {1,i}))),i=1..n); %p A196667 for j in [$3..n] do p := ithprime(j); pr := p^r; %p A196667 if evalf(Li(psi(pr))-Li(psi(pr-1))) < 1/r then L:= L,p fi od; L end: %p A196667 A196667 := n -> PlanatSole(n,1); # _Peter Luschny_, Oct 23 2011 %t A196667 ChebyshevPsi[n_] := Log[LCM @@ Range[n]]; %t A196667 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 *) %o A196667 (Magma) %o A196667 Mangoldt:=function(n); %o A196667 if #Factorization(n) eq 1 then return Log(Factorization(n)[1][1]); else return 0; end if; %o A196667 end function; %o A196667 tcheb:=function(n); %o A196667 x:=0; %o A196667 for i in [1..n] do %o A196667 x:=x+Mangoldt(i); %o A196667 end for; %o A196667 return(x); %o A196667 end function; %o A196667 jump1:=function(n); %o A196667 x:=LogIntegral(tcheb(NthPrime(n)))-LogIntegral(tcheb(NthPrime(n)-1)); %o A196667 return x; %o A196667 end function; %o A196667 Set1:=[]; %o A196667 for i in [2..1000] do %o A196667 if jump1(i)-1 lt 0 then Set1:=Append(Set1,NthPrime(i)); NthPrime(i); end if; %o A196667 end for; %o A196667 Set1; %o A196667 (Sage) %o A196667 from mpmath import mp, mangoldt %o A196667 mp.dps = 25; %o A196667 def psi(n) : %o A196667 return sum(mangoldt(i) for i in (1..n)) %o A196667 def PlanatSole(n,r) : %o A196667 P = Primes(); L = [] %o A196667 for j in (2..n): %o A196667 p = P.unrank(j) %o A196667 pr = p^r %o A196667 if Li(psi(pr)) - Li(psi(pr-1)) < 1/r : %o A196667 L.append(p) %o A196667 return L %o A196667 def A196667List(n) : return PlanatSole(n,1) %o A196667 A196667List(100) # _Peter Luschny_, Oct 23 2011 %o A196667 (Perl) %o A196667 use ntheory ":all"; forprimes { say if LogarithmicIntegral(chebyshev_psi($_))-LogarithmicIntegral(chebyshev_psi($_-1)) < 1 } 3,1000; # _Dana Jacobsen_, Dec 29 2015 %Y A196667 Cf. A196668-A196675. %K A196667 nonn %O A196667 1,1 %A A196667 _Michel Planat_, Oct 05 2011