cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A365049 a(n) is the number of distinct parallelograms with integer sides and area n, and where at least one height is an integer.

This page as a plain text file.
%I A365049 #22 Aug 21 2023 12:01:27
%S A365049 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 A365049 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 A365049 2,4,18,19,8,16,2,10,8,16,2,45,2,4,18,10,8,16,2,34,13
%N A365049 a(n) is the number of distinct parallelograms with integer sides and area n, and where at least one height is an integer.
%C A365049 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 A365049 F. Richman, <a href="http://math.fau.edu/Richman/mla/pythag3s.htm">Pythagorean triples</a>.
%H A365049 Wikipedia, <a href="https://en.wikipedia.org/wiki/Parallelogram">Parallelogram</a>.
%H A365049 Wikipedia, <a href="https://en.wikipedia.org/wiki/Table_of_divisors">Table of divisors</a>.
%F A365049 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 A365049 otherwise, a(n) = Sum_{i = 1..A000005(n)/2} (1 + A046079(A027750(n,i)) + A046079(n/A027750(n,i))).
%e A365049 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 A365049 (Python)
%o A365049 from math import prod
%o A365049 from itertools import takewhile
%o A365049 from sympy import factorint, divisors
%o A365049 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 A365049 Cf. A000005, A027750, A046079, A224931, A214602.
%K A365049 nonn
%O A365049 1,3
%A A365049 _Felix Huber_, Aug 18 2023