OFFSET
1,1
COMMENTS
Integers of the form (n+k)/|(n-k)| for integer k are exactly the numbers d-1 and d+1 where d runs through the divisors of 2n. Of those, 0 and 1 do not count because they correspond to nonpositive k. - Ivan Neretin, Sep 07 2017
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=14 we have integer values of this form when k={7; 10; 12; 13; 15; 16; 18; 19; 21; 28; 42} and (14+k)/|(14-k)| = {3, 6, 13, 27, 29, 15, 8, 5, 3, 2}. Thus a(14) = 9 because 3 is present twice.
MATHEMATICA
f[n_] := Length[ Union[ Select[(n + #)/Abs[n - # ] & /@ Delete[ Range[ Floor[3n]], n], IntegerQ[ # ] &]]]; Array[f, 83] (* Robert G. Wilson v, Oct 31 2005 *)
Table[d = Divisors[2 n]; Length@Union[Drop[d - 1, 2], d + 1], {n, 83}] (* Ivan Neretin, Sep 07 2017 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Oct 21 2005
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Oct 31 2005
STATUS
approved