VOOZH about

URL: https://oeis.org/A394056

⇱ A394056 - OEIS


login
A394056
Number of positive integers <= n with 4 divisors.
2
0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 6, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 10, 11, 12, 12, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 18, 19, 19, 19, 19, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24
OFFSET
1,8
LINKS
FORMULA
a(n) = A394052(n,4), n >= 6.
a(n) = primepi(floor(n^(1/3))) + Sum_{i=1..primepi(floor(sqrt(n)))} (primepi(floor(n/prime(i))) - i). - Chai Wah Wu, Mar 27 2026
EXAMPLE
6 is the smallest number with 4 divisors, they are [1, 2, 3, 6], so a(1) = a(2) = a(3) = a(4) = a(5) = 0 and a(6) = 1.
MAPLE
a:= proc(n) option remember; `if`(n=0, 0,
a(n-1)+`if`(4=numtheory[tau](n), 1, 0))
end:
seq(a(n), n=1..80); # Alois P. Heinz, Mar 22 2026
MATHEMATICA
a[n_]:=Length[Select[Range[n], DivisorSigma[0, #]==4 &]]; Array[a, 80] (* Stefano Spezia, Mar 22 2026 *)
seq[n_] := Accumulate[Table[Boole[DivisorSigma[0, k] == 4], {k, 1, n}]]; seq[100] (* Amiram Eldar, Mar 22 2026 *)
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A394056(n): return int(-((t:=primepi(s:=isqrt(n)))*(t+1)>>1)+sum(primepi(n//k) for k in primerange(1, s+1))+primepi(integer_nthroot(n, 3)[0])) # Chai Wah Wu, Mar 27 2026
CROSSREFS
Column 4 of A394052.
Partial sums of A354927, minus 1.
Indices of records give A007422.
Sequence in context: A362970 A194343 A071860 * A358472 A004788 A284523
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Mar 21 2026
STATUS
approved