login
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)).
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,4
COMMENTS
Sum of even divisors of n in the half-open interval [sqrt(n/2), sqrt(n*2)).
Also sum of even numbers in the n-th row of A299761.
LINKS
Michael De Vlieger, Log log scatterplot of a(n) n = 1..2^16 (ignoring zeros).
FORMULA
a(n) = A071090(n) - A361824(n).
EXAMPLE
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.
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 *)
PROG
(PARI) a(n) = vecsum(select(x->((x >= sqrt(n/2)) && (x < sqrt(n*2)) && !(x%2)), divisors(n))); \\ Michel Marcus, Mar 31 2023
KEYWORD
nonn,look
AUTHOR
Omar E. Pol, Mar 27 2023
STATUS
approved