OFFSET
1,5
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000 (* First 500 terms from Owen Whitby *)
EXAMPLE
The divisors of 14 are 1,2,7,14. The two middle divisors are 2 and 7. Between 2 and 7 (and not including 2 and 7) there are 2 primes (3 and 5). So a(14) = 2.
MATHEMATICA
a143143[minn_, maxn_]:=Module[{d, ld, a, b, c, lst143143={}}, Do[d=Divisors[n ]; ld=Length[d]; If[OddQ[ld], AppendTo[lst143143, {n, 0}], a=ld/2; b=d[[a]]; c =d[[ a+1]]; AppendTo[lst143143, {n, PrimePi[c-1]-PrimePi[b]}]], {n, minn, maxn}]; Transpose[lst143143]//MatrixForm] - Owen Whitby, Oct 22 2008
np[n_]:=Module[{s=Sqrt[n], d=Divisors[n]}, Count[Range[Max[Select[d, #<=s&]] +1, Min[Select[d, #>=s&]]-1], _?PrimeQ]]; Array[np, 100] (* Harvey P. Dale, Nov 06 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 27 2008
EXTENSIONS
a(16) to a(500) from Owen Whitby, Oct 22 2008
STATUS
approved