OFFSET
1,12
LINKS
Wikipedia, Integer Triangle
FORMULA
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * [d(k) = d(i) = d(n-i-k)], where [] is the Iverson bracket and d(n) is the number of divisors of n (A000005).
EXAMPLE
a(12) = 2; The perimeter of each of the two triangles [2,5,5] and [4,4,4] is 12 and the side lengths for each triangle share the same number of divisors (i.e., d(2) = d(5) = d(5) = 2 and d(4) = d(4) = d(4) = 3).
a(15) = 2; The perimeter of each of the two triangles [3,5,7] and [5,5,5] is 15 and the side lengths for each triangle share the same number of divisors (i.e., d(3) = d(5) = d(7) = 2 and d(5) = d(5) = d(5) = 2).
MATHEMATICA
Table[Sum[Sum[KroneckerDelta[DivisorSigma[0, i], DivisorSigma[0, k], DivisorSigma[0, n - i - k]]*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 14 2020
STATUS
approved
