login
A375338
Number of distinct, irreducible ways that a Pythagorean hyperrectangle of 2 or more dimensions can produce diagonal length n.
0
0, 1, 1, 1, 1, 1, 3, 5, 8, 5, 12, 16, 14, 23, 17, 52, 57, 58, 108, 104, 113, 174, 248, 359, 217, 265, 406, 597, 731, 579, 1137, 1525, 1137, 1400, 1898, 2659, 3136, 3073, 3203, 5021, 4660, 5022, 8410, 8850, 7748, 10066, 15455, 18718, 17354, 12118, 18483, 22683
OFFSET
1,7
COMMENTS
Here "irreducible" means the base and diagonal lengths are coprime, and no subset of bases form smaller Pythagorean hyperrectangles.
Subset of cases counted in A037444, which includes nonreduced cases and 1 dimensional cases.
EXAMPLE
a(2)=1: {1, 1, 1, 1}
a(3)=1: {1, 2, 2}
...
a(7)=3: {1, 4, 4, 4}, {2, 2, 4, 5}, {2, 3, 6}
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}
...
Not counted:
{0} -> 0 (0 length base, <2 dimensions)
{1} -> 1 (<2 dimensions)
{1, 1, 1, 1, 1, 1, 1, 1, 1} -> 3 (contains subset {1, 1, 1, 1} -> 2)
{4, 3} -> 5 (indistinct from {3, 4} -> 5)
{6, 8} -> 10 (reduces to {3, 4} -> 5)
{5, 6, 6, 8, 8} -> 15 (reduces to {5, 10, 10} -> 15, then to {1, 2, 2} -> 3)
PROG
(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
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
for(n=1, 52, print(n, " ", a(n)))
CROSSREFS
Cf. A037444.
Sequence in context: A021902 A136188 A073334 * A368741 A021740 A172370
KEYWORD
nonn
AUTHOR
Charles L. Hohn, Aug 12 2024
STATUS
approved