A358434 Number of odd middle divisors of n, where "middle divisor" means a divisor in the half-open interval [sqrt(n/2), sqrt(n*2)).
1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 0
Offset: 1
Keywords
Examples
For n = 8 the middle divisor of 8 is [2]. There are no odd middle divisors of 8 so a(8) = 0. For n = 12 the middle divisors of 12 are [3, 4]. There is only one odd middle divisor of 12 so a(12) = 1. For n = 15 the middle divisors of 15 are [3, 5]. There are two odd middle divisors of 15 so a(15) = 2.
Programs
-
Mathematica
Table[DivisorSum[n, 1 &, And[OddQ[#], Sqrt[n/2] <= # < Sqrt[2*n]] &], {n, 120}] (* Michael De Vlieger, Mar 31 2023 *)
-
PARI
a(n) = #select(x->((x >= sqrt(n/2)) && (x < sqrt(n*2)) && x%2), divisors(n)); \\ Michel Marcus, Mar 26 2023
Comments