OFFSET
1,45
COMMENTS
An anti-divisor of n is a number d in the range [2,n-1] which does not divide n and is either a (necessarily odd) divisor of 2n-1 or 2n+1, or a (necessarily even) divisor of 2n.
a(n) = 0 if n is a prime power.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
EXAMPLE
a(45) = 2 with triples (5, 3, 5 mod 3) and (15, 9, 15 mod 9) since 3, 5, 9, and 15 are divisors of 45 and 5 mod 3 = 2 and 15 mod 9 = 6 are anti-divisors of 45.
PROG
(PARI) a(n)=my(d=divisors(n)); sum(i=1, #d-1, sum(j=i+1, #d, my(z=d[j]%d[i]); z && n%z && if(z%2, (2*n+1)%z==0 || (2*n-1)%z==0, (2*n)%z==0))) \\ Charles R Greathouse IV, Aug 26 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 20 2015
STATUS
approved