OFFSET
1,1
COMMENTS
The first 10000 terms are the same as A108310 (see that sequence for comments). - Charles R Greathouse IV, Dec 18 2014
This sequence, unlike A108310, is presumably infinite; it is finite if and only if theta(n) = n for some number n.
LINKS
Jean-François Alcover and Charles R Greathouse IV, Table of n, a(n) for n = 1..5000 (first 88 terms from Alcover)
Eric Weisstein's MathWorld, Chebyshev functions
Wikipedia, Chebyshev function
EXAMPLE
Given that 1 - theta(3)/3 = 1 - log(6)/3 = 0.40..., 1 - theta(4)/4 = 1 - log(6)/4 = 0.55... and 1 - theta(5)/5 = 1 - log(30)/5 = 0.31..., the next term after 3 is 5.
MATHEMATICA
(* Adapted from PARI *) Reap[For[record = 2; theta = 0; p = 2, p < 2 * 10^8, p = NextPrime[p], theta = theta + Log[p] //N; d = Abs[1 - theta/p]; If[d < record, record = d; Print[p]; Sow[p]]]][[2, 1]]
PROG
(PARI) /* Note: This program may fail if you replace 1e6 with a number larger than 1e17, and will certainly fail at some point below 1e316. These large numbers are not remotely feasible at the moment. */
r=th=0; forprime(p=2, 1e6, th+=log(p); t=th/p; if(t>r, r=t; print1(p", "); if(t>1, warning("theta(n) > n, possible missed terms")))) \\ Charles R Greathouse IV, Dec 17 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-François Alcover, Dec 17 2014
STATUS
approved