OFFSET
1,5
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Randell Heyman, Primes in floor function sets, arXiv:2111.00408 [math.NT], 2021.
FORMULA
If p is a prime other than 3, a(p) = a(p-1) + 1. - Franklin T. Adams-Watters, Apr 27 2020
a(n) = A179119*n + O(n^(1/2)). - Randell Heyman, Oct 06 2022
a(n) = Sum_{p prime and p<=n} (floor(n/p) - floor(n/(p+1))). - Ridouane Oudra, Jun 03 2024
EXAMPLE
a(10) = 4 as floor(10/k) for k = 1 to 10 is 10,5,3,2,2,1,1,1,1,1, respectively; this is prime for k = 2,3,4,5.
MATHEMATICA
a[n_] := Length[Select[Table[Floor[n/i], {i, 1, n}], PrimeQ]]
Table[Count[Table[Floor[n/k], {k, n}], _?PrimeQ], {n, 80}] (* Harvey P. Dale, Nov 19 2022 *)
PROG
(Haskell)
a068050 n = length [k | k <- [1..n], a010051 (n `div` k) == 1]
-- Reinhard Zumkeller, Jan 31 2012
(PARI) a(n) = sum(k=1, n, isprime(n\k)); \\ Michel Marcus, Jun 03 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Feb 12 2002
EXTENSIONS
Edited by Dean Hickerson, Feb 12 2002
STATUS
approved