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.

A376900 a(n) is the number of distinct integer-sided right triangles that can be drawn into a square with side length n.

This page as a plain text file.
%I A376900 #34 Nov 03 2024 19:30:55
%S A376900 0,0,0,0,1,1,1,1,2,2,2,3,4,4,5,5,6,6,6,6,8,10,10,10,11,11,11,11,13,13,
%T A376900 14,14,17,17,17,18,18,18,18,19,20,21,23,25,25,25,25,27,27,27,27,29,31,
%U A376900 31,31,34,34,34,34,37,37,37,37,40,41,42,43,43,45,45,46
%N A376900 a(n) is the number of distinct integer-sided right triangles that can be drawn into a square with side length n.
%H A376900 Felix Huber, <a href="/A376900/b376900.txt">Table of n, a(n) for n = 0..10000</a>
%H A376900 Felix Huber, <a href="/A376900/a376900.txt">Maple program to calculate the right triangles for a given n</a>
%e A376900 a(11) = 3 because exactly the 3 integer-sided right triangles (3, 4, 5), (6, 8, 10), (5, 12, 13) can be drawn into a square with side length 11.
%e A376900 See linked Maple program to calculate the right triangles for a given n.
%p A376900 A376900:=proc(n)
%p A376900    local a,p,q,v,k;
%p A376900    a:=0;
%p A376900       for p from 2 to evalf(sqrt(sqrt(2)*n+1)) do
%p A376900          for q from 1 to min(p-1,floor(n/(sqrt(2)*p))) do
%p A376900             if gcd(p,q)=1 and is(p+q,odd) then
%p A376900                v:=max(p^2-q^2,2*p*q);
%p A376900                k:=min(p^2-q^2,2*p*q)/v;
%p A376900                a:=a+floor(n/v*sqrt(k^2-2*k+2));
%p A376900             fi;
%p A376900          od;
%p A376900       od;
%p A376900    return a;
%p A376900 end proc;
%p A376900 seq(A376900(n),n=0..70);
%Y A376900 Cf. A009012.
%K A376900 nonn
%O A376900 0,9
%A A376900 _Felix Huber_, Oct 25 2024