login
A394792
Number of positive integers <= n with exactly three odd divisors.
1
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9
OFFSET
1,18
COMMENTS
a(n) is also the number of positive integers <= n with 3 partitions into consecutive parts.
a(n) is also the number of positive integers m <= n whose symmetric representation of sigma(m) has 3 subparts.
For a theorem of correspondence between the partitions of n into k consecutive parts and the odd divisors of n see A379630.
EXAMPLE
The first number with 3 odd divisors is 9 so a(9) = 1.
The second number with 3 odd divisors is 18 so a(18) = 2.
The third number with 3 odd divisors is 25 so a(25) = 3.
The three partitions of 9 into consecutive parts are [9], [5, 4], [4, 3, 2].
The three partitions of 18 into consecutive parts are [18], [7, 6, 5], [6, 5, 4, 3].
The three partitions of 25 into consecutive parts are [25], [13, 12], [7, 6, 5, 4, 3].
MATHEMATICA
seq[n_] := Accumulate[Table[Boole[DivisorSigma[0, k/2^IntegerExponent[k, 2]] == 3], {k, 1, n}]]; seq[100] (* Amiram Eldar, Apr 04 2026 *)
PROG
(Python)
from math import isqrt
from sympy import primepi
def A394792(n): return 1-(m:=n.bit_length()-1)+sum(primepi(isqrt(n>>i)) for i in range(m)) # Chai Wah Wu, Apr 13 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Apr 04 2026
STATUS
approved