login
A389672
a(n) is the number of distinct pairs of integer-sided polygons obtainable by making a single straight cut through an nXn square.
2
0, 0, 1, 1, 3, 3, 4, 4, 7, 6, 7, 7, 14, 10, 11, 15, 16, 14, 15, 15, 19, 18, 19, 19, 41, 23, 24, 24, 29, 26, 35, 28, 34, 30, 31, 43, 49, 35, 36, 36, 59, 39, 42, 41, 48, 63, 46, 46, 87, 50, 51, 51, 59, 53, 54, 58, 76, 58, 59, 59, 126, 64, 65, 91, 77, 69, 70, 70, 80, 72
OFFSET
0,5
COMMENTS
A polygon pair consists of either two rectangles, two non-rectangular right trapezoids, a right triangle and a non-rectangular right trapezoid, or a right triangle and a pentagon.
FORMULA
a(n) = A004526(n) + Sum_{k=1..n-1} A056137(k) + Sum_{j=1..A056137(n)} floor((n-A046083(i[j])+2)/2), where i[j] is the index of the j-th term in A046084 that equals n.
EXAMPLE
a(8) = 7. Place a square of side length 8 in a Cartesian coordinate system, axis-aligned, with its lower-left corner at the origin. The 7 straight cuts are the segments [(0, 1), (8, 1)], [(0, 2), (8, 2)], [(0, 3), (8, 3)], [(0, 4), (8, 4)], [(0, 0), (8, 6)], [(0, 1), (8, 7)] and [(0, 3), (4, 0)]. No further straight cut yields a distinct pair of integer-sided polygons.
MAPLE
A389672:=proc(N) # To get the terms a(0) to a(N)
local a, i, l, m, x, y, u, v;
if N=0 then return 0 fi;
l:=[];
for x from 2 to floor(sqrt(floor(sqrt(2*N^2-2*N+1)-1))) do
for y to x-1 while x^2+y^2<=floor(sqrt(2*N^2-2*N+1)-1) do
if gcd(x, y)=1 and is(x-y, odd) then
u:=min(x^2-y^2, 2*x*y);
v:=max(x^2-y^2, 2*x*y);
l:=[op(l), seq(i*[v, u], i=1..N/v)]
fi
od
od;
m:=sort([seq(l[i, 1], i=1..nops(l))]);
a:=Vector(N);
for i to N do
a(i):=floor(i/2)+nops(select(x->x<i, m))
od;
for i in l do
a(i[1]):=a(i[1])+floor((i[1]-i[2]+2)/2)
od;
return 0, op(convert(a, list))
end proc;
A389672(69);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Oct 14 2025
STATUS
approved