OFFSET
1,2
COMMENTS
Number of distinct rectangles that can be made using the 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
a(n) = Sum_{d1|n, d2|n, d1<=d2} (1 - [d1 + 1 = d2]), where [] is the Iverson bracket.
EXAMPLE
a(6) = 8; The divisors of 6 are {1,2,3,6}. There are 8 divisor pairs, (d1,d2), with d1 <= d2 that do not contain consecutive integers. They are (1,1), (1,3), (1,6), (2,2), (2,6), (3,3), (3,6) and (6,6). So a(6) = 8.
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}], {k, n}], {n, 100}]
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