Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Aug 21 2023 12:01:27
%S 1,1,2,3,2,4,2,5,5,4,2,10,2,4,8,9,2,9,2,10,8,4,2,20,5,4,8,10,2,16,2,
%T 13,8,4,8,23,2,4,8,20,2,16,2,10,18,4,2,34,5,9,8,10,2,16,8,20,8,4,2,40,
%U 2,4,18,19,8,16,2,10,8,16,2,45,2,4,18,10,8,16,2,34,13
%N a(n) is the number of distinct parallelograms with integer sides and area n, and where at least one height is an integer.
%C If n is not a square, there are A000005(n)/2 rectangles with A027750(n,i)*A027750(n,j) = n, i < j. If n is a square, there are (A000005(n)-1)/2 rectangles with A027750(n,i)*A027750(n,j) = n, i < j and a square with A027750(n,(A000005(n)+1)/2)^2 = n. From these rectangles and, if present, the square, further parallelograms of equal area and integer sides can be formed. A046079(A027750(n,k)) is the number of possibilities there are for each side of the rectangle or for the side of the square.
%H F. Richman, <a href="http://math.fau.edu/Richman/mla/pythag3s.htm">Pythagorean triples</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Parallelogram">Parallelogram</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Table_of_divisors">Table of divisors</a>.
%F If n is a square, then a(n) = 1 + A046079(A027750(n, (A000005(n) + 1)/2)) + Sum_{i = 1..(A000005(n) - 1)/2} (1 + A046079(A027750(n,i)) + A046079(n/A027750(n,i)));
%F otherwise, a(n) = Sum_{i = 1..A000005(n)/2} (1 + A046079(A027750(n,i)) + A046079(n/A027750(n,i))).
%e For area n = 9 there is one rectangle (sides of lengths: 1,9) and a square (3,3) with integer sides. From both, further parallelograms with area n = 9 and integer sides can be formed. Since (9,12,15) and (9,40,41) are the only Pythagorean triples with leg 9, from the rectangle (1,9) exactly the two further parallelograms (1,15) and (1,41) with height 9 can be formed, but no further parallelogram with height 1. Since (3,4,5) is the only Pythagorean triple with leg 3, from the square (3,3) exactly one further parallelogram (3,5) with height 3 can be formed. Therefore for area n = 9 there are a(9) = 5 distinct parallelograms with integer sides.
%o (Python)
%o from math import prod
%o from itertools import takewhile
%o from sympy import factorint, divisors
%o def A365049(n): return sum(1+(prod((e+(p&1)<<1)-1 for p, e in factorint(d).items())>>1)+(prod((e+(p&1)<<1)-1 for p, e in factorint(n//d).items())>>1 if d*d<n else 0) for d in takewhile(lambda d:d*d<=n, divisors(n))) # _Chai Wah Wu_, Aug 21 2023
%Y Cf. A000005, A027750, A046079, A224931, A214602.
%K nonn
%O 1,3
%A _Felix Huber_, Aug 18 2023