OFFSET
1,5
COMMENTS
a(n) is also the number of positive integers <= n with two partitions into consecutive parts.
a(n) is also the number of positive integers m <= n whose symmetric representation of sigma(m) has two subparts.
EXAMPLE
The first number with two odd divisors is 3 so a(3) = 1.
4 has only one odd divisor so a(4) = a(3) = 1.
The second number with two odd divisors is 5 so a(5) = 2.
The third number with two odd divisors is 6 so a(6) = 3.
The two partitions of 3 into consecutive parts are [3], [2, 1].
The two partitions of 5 into consecutive parts are [5], [3, 2].
The two partitions of 6 into consecutive parts are [6], [3, 2, 1].
MATHEMATICA
seq[n_] := Accumulate[Table[Boole[DivisorSigma[0, k/2^IntegerExponent[k, 2]] == 2], {k, 1, n}]]; seq[100] (* Amiram Eldar, Apr 03 2026 *)
PROG
(Python)
from sympy import primepi
def A394789(n): return -(m:=n.bit_length()-1)+sum(primepi(n>>i) for i in range(m)) # Chai Wah Wu, Apr 13 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Apr 03 2026
STATUS
approved
