login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306998 List of low point records for pi(n)/n. 1
2, 9, 10, 16, 22, 25, 26, 27, 28, 35, 36, 40, 51, 52, 56, 57, 58, 66, 70, 78, 82, 86, 87, 88, 92, 93, 94, 95, 96, 121, 122, 123, 124, 125, 126, 135, 136, 145, 146, 147, 148, 162, 171, 172, 177, 178, 187, 188, 189, 190, 209, 210, 215, 216, 217, 218, 219, 220 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Let f(n) = pi(n)/n, where pi(n) is the prime-counting function (A000720). This sequence is the list of numbers n such that f(n) < f(k) for 2 <= k < n.

Because the primes generally become sparser forever, this list is infinite.

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000

EXAMPLE

f(10) = 0.4, which is smaller than f(2), f(3), ... , f(9), so 10 is in the list.

MATHEMATICA

s={}; rm=1; Do[r = PrimePi[n]/n; If[r<rm, rm=r; AppendTo[s, n]], {n, 2, 1000}]; s (* Amiram Eldar, Mar 19 2019 *)

PROG

(Haskell)

-- Very poor Haskell code, but let it stand until someone contributes the

-- elegant three-liner that must exist. Its only merit is that it was actually

-- used to produce the data given.

isPrime :: Int -> Bool

isPrime = isPrime1 2

isPrime1 :: Int -> Int -> Bool

isPrime1 d n = n /= 1 && (d^2 > n || mod n d /= 0 && isPrime1 (d+1) n)

count :: (a -> Bool) -> [a] -> Int

count f [] = 0

count f (x:xs) = (if f x then 1 else 0) + count f xs

pdf :: Int -> Double

pdf n = fromIntegral (count isPrime [1..n]) / fromIntegral n

isRecord :: Int -> Bool

isRecord n = (n == 2) || (pdf n) < (minimum (map pdf [2..(n-1)]))

records :: [Int]

records = filter isRecord [2..100]

CROSSREFS

Cf. A000720.

Sequence in context: A051017 A078180 A058890 * A047468 A032929 A226832

Adjacent sequences:  A306995 A306996 A306997 * A306999 A307000 A307001

KEYWORD

nonn,easy

AUTHOR

Allan C. Wechsler, Mar 18 2019

EXTENSIONS

More terms from Amiram Eldar, Mar 19 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 23:05 EDT 2022. Contains 353886 sequences. (Running on oeis4.)