even_anti_divisor? = fn nmodk, k -> nmodk == k / 2 end
odd_anti_divisor? = fn nmodk, k -> nmodk == (k - 1) / 2 or nmodk == (k + 1) / 2 end
anti_divisor? = fn nmodk, k -> even_anti_divisor?.(nmodk, k) or odd_anti_divisor?.(nmodk, k) end
anti_divisors = fn n ->
for k <- 2..(n - 1),
n > 2 and anti_divisor?.(rem(n, k), k),
into: [],
do: k
end
anti_divisors.(1)
# []
anti_divisors.(2)
# []
anti_divisors.(3)
# [2]
anti_divisors.(5)
# [2, 3]
anti_divisors.(10)
# [3, 4, 7]
anti_divisors.(234)
# [4, 7, 12, 36, 52, 67, 156]