OFFSET
1,2
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..112
Sascha Kurz, Enumeration of integral tetrahedra, arXiv:0804.1310 [math.CO], 2008.
Hugo Pfoertner, Plot of ratio a(n)/A097125(n) using Plot 2.
Karl Wirth and Andre Dreiding, Edge lengths determining tetrahedrons, Elemente der Mathematik, 64 (2009), 160-170.
PROG
(PARI) \\ Cayley-Menger determinant
CM(v) = {matdet ([0, 1, 1, 1, 1; 1, 0, v[1]^2, v[2]^2, v[3]^2; 1, v[1]^2, 0, v[4]^2, v[5]^2; 1, v[2]^2, v[4]^2, 0, v[6]^2; 1, v[3]^2, v[5]^2, v[6]^2, 0])};
\\ First version using loops over 5 edges d_ij as described in Algorithm 1 (Sascha Kurz, 2008)
a371345(n) = {my (L=List(), v=vector(6)); v[1]=n; for (d02=floor((n+2)/2), n, v[2]=d02; for (d12=n+1-d02, d02, v[3]=d12; for (d03=n+1-d02, d02, v[4]=d03; for (d13=n+1-d03, d02, v[5]=d13; for (d23=1, n, v[6]=d23; forperm (v, w, my (c=CM(w)); if (c>0, listput(L, c)))))))); #Set(Vec(L))};
\\ Second version using simple minded loops and triangle inequalities. See Wirth
\\ and Dreiding (2009), p. 165, for justification to check only one triangle.
a371345(n) = {my (L=List(), w=vector(6)); w[1]=n; for(w2=1, n, w[2]=w2; for(w3=1, n, w[3]=w3; for(w4=1, n, w[4]=w4; for(w5=1, n, w[5]=w5; for(w6=1, n, w[6]=w6; forperm (w, v, if(v[4]+v[5]<v[6], next); if(v[4]+v[6]<v[5], next); if(v[5]+v[6]<v[4], next); my(c=CM(v)); if (c>0, my(j=setsearch(L, c, 1)); if (j>0, listinsert(~L, c, j))))))))); #Set(Vec(L))};
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Mar 19 2024
STATUS
approved