OFFSET
1,4
COMMENTS
Number of pairs of divisors of n, (d1,d2), with d1 < d2 such that d1 and d2 are nonconsecutive integers. For example, the 4 pairs for a(6) are (1,3), (1,6), (2,6) and (3,6).
Also, the number of distinct nonsquare rectangles that can be made using any divisors of n as side lengths and whose length is never one more than its width.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
MATHEMATICA
Table[Sum[Sum[(1 - KroneckerDelta[i + 1, k]) (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]
Table[Count[Subsets[Divisors[n], {2}], _?(#[[2]]-#[[1]]>1&)], {n, 90}] (* Harvey P. Dale, Mar 11 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d1, sumdiv(n, d2, (d1<d2) && (d1 + 1 != d2))); \\ Michel Marcus, Aug 25 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Aug 24 2020
STATUS
approved