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.

A375338 Number of distinct, irreducible ways that a Pythagorean hyperrectangle of 2 or more dimensions can produce diagonal length n.

This page as a plain text file.
%I A375338 #9 Sep 03 2024 01:38:47
%S A375338 0,1,1,1,1,1,3,5,8,5,12,16,14,23,17,52,57,58,108,104,113,174,248,359,
%T A375338 217,265,406,597,731,579,1137,1525,1137,1400,1898,2659,3136,3073,3203,
%U A375338 5021,4660,5022,8410,8850,7748,10066,15455,18718,17354,12118,18483,22683
%N A375338 Number of distinct, irreducible ways that a Pythagorean hyperrectangle of 2 or more dimensions can produce diagonal length n.
%C A375338 Here "irreducible" means the base and diagonal lengths are coprime, and no subset of bases form smaller Pythagorean hyperrectangles.
%C A375338 Subset of cases counted in A037444, which includes nonreduced cases and 1 dimensional cases.
%e A375338 a(2)=1: {1, 1, 1, 1}
%e A375338 a(3)=1: {1, 2, 2}
%e A375338 ...
%e A375338 a(7)=3: {1, 4, 4, 4}, {2, 2, 4, 5}, {2, 3, 6}
%e A375338 a(8)=5: {1, 1, 1, 5, 6}, {1, 1, 2, 3, 7}, {1, 2, 3, 5, 5}, {1, 3, 3, 3, 6}, {2, 2, 2, 3, 3, 3, 5}
%e A375338 ...
%e A375338 Not counted:
%e A375338 {0} -> 0 (0 length base, <2 dimensions)
%e A375338 {1} -> 1 (<2 dimensions)
%e A375338 {1, 1, 1, 1, 1, 1, 1, 1, 1} -> 3 (contains subset {1, 1, 1, 1} -> 2)
%e A375338 {4, 3} -> 5 (indistinct from {3, 4} -> 5)
%e A375338 {6, 8} -> 10 (reduces to {3, 4} -> 5)
%e A375338 {5, 6, 6, 8, 8} -> 15 (reduces to {5, 10, 10} -> 15, then to {1, 2, 2} -> 3)
%o A375338 (PARI) a(n)=if(n, /* globals */ v=List([n]); c=n^2; a_n=0); if(c==0, if(#v>=3 && gcd(concat(v))==1, a_n++); return); my(b=if(#v>=2, v[#v], 1)-1); while(b++ && b^2<=c, if(hassub(b^2)==true, next); listput(v, b); c-=b^2; a(); c+=b^2; listpop(v)); a_n
%o A375338 hassub(b2)=my(r=false); for(t=1, 2^(#v-1)-1-if(b2==c, 1, 0), my(tb=binary(t)); if(issquare(b2+sum(i=0, #tb-1, tb[#tb-i]*v[#v-i]^2)), r=true; break)); r
%o A375338 for(n=1, 52, print(n, " ", a(n)))
%Y A375338 Cf. A037444.
%K A375338 nonn
%O A375338 1,7
%A A375338 _Charles L. Hohn_, Aug 12 2024