A361879 Sum of even middle divisors of n, where "middle divisor" means a divisor in the half-open interval [sqrt(n/2), sqrt(n*2)).
0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 4, 0, 6, 0, 4, 0, 0, 0, 6, 0, 0, 0, 8, 0, 6, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 6, 0, 8, 0, 0, 0, 16, 0, 0, 0, 8, 0, 6, 0, 0, 0, 10, 0, 14, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 12, 0, 0, 0, 8, 0, 10, 0, 0, 0, 0, 0, 20
Offset: 1
Examples
For n = 18 the middle divisor of 18 is [3]. There are no even middle divisors of 18 so a(18) = 0. For n = 20 the middle divisors of 20 are [4, 5]. There is only one even middle divisor of 20 so a(20) = 4. For n = 24 the middle divisors of 24 are [4, 6]. There are two even middle divisors of 24 so a(24) = 4 + 6 = 10.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log scatterplot of a(n) n = 1..2^16 (ignoring zeros).
Crossrefs
Programs
-
Maple
f:= proc(n) local D; if n::odd then return 0 fi; D:= select(proc(d) local s; if d::odd then return false fi; s:= d^2; s >= n/2 and s < 2*n end proc, numtheory:-divisors(n)); convert(D,`+`) end proc: map(f, [$1..100]); # Robert Israel, Mar 18 2024
-
Mathematica
Table[DivisorSum[n, # &, And[EvenQ[#], Sqrt[n/2] <= # < Sqrt[2 n]] &], {n, 120}] (* Michael De Vlieger, Mar 28 2023 *)
-
PARI
a(n) = vecsum(select(x->((x >= sqrt(n/2)) && (x < sqrt(n*2)) && !(x%2)), divisors(n))); \\ Michel Marcus, Mar 31 2023
Comments