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.

User: Albert Lau

Albert Lau's wiki page.

Albert Lau has authored 18 sequences. Here are the ten most recent ones:

A293260 Number of adventitious quadrangles (convex, noncyclic, not kite) such that Pi/n is the largest number that divides all the angles.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 12, 0, 9, 0, 14, 0, 75, 0, 26, 0, 35, 0, 110, 0, 54, 0, 57, 0, 436
Offset: 1

Author

Albert Lau, Oct 04 2017

Keywords

Comments

"All the angles" in the title means any angle formed by 3 vertices. There are 8 nonoverlapping angles in total.
Consider convex quadrilateral ABCD. Let a,b,c,d,e,f,g,h be the angles ABD,DBC,BCA,ACD,CDB,BDA,DAC,CAB, respectively. A quadrangle is adventitious if all these angles are rational multiples of Pi.
Cyclic quadrilaterals have properties a=d, b=g, c=f, e=h, thus making the adventitious case trivial.
Kites have properties a=b, c=h, d=g, e=f, thus making the adventitious case trivial.
Some properties:
1. b+c = f+g := x, d+e = h+a := y, x+y = Pi.
2. sin(a)sin(c)sin(e)sin(g) = sin(b)sin(d)sin(f)sin(h).
3. In an adventitious quadrangle, swapping angles (b,c) with (f,g) or (a,h) with (d,e) gives another adventitious quadrangle.
From empirical observation, it seems that no adventitious quadrangles exist for odd numbers n. For example, take n=9: 180 degrees/9 = 20 degrees, and forming a quadrangle in which all angles are multiples of 20 degrees is impossible (proven by brute force). It seems to hold for all odd numbers n.
Perhaps the most famous case is Langley's problem (where n=18).

Examples

			a(8) = 1 because there is one quadrangle where all angles are divisible by 180/8 = 22.5 degrees.
  a=90, b=45, c=22.5, d=45, e=67.5, f=45, g=22.5, h=22.5.
a(10) = 2 (180/10 = 18):
   72  54  18  36  72  36  36  36
  108  36  18  54  72  36  18  18
a(12) = 12 (180/12 = 18):
   75  30  45  45  60  60  15  30
   75  60  15  45  60  30  45  30
   90  30  30  45  75  45  15  30
   90  45  15  45  75  30  30  30
   90  45  30  45  60  60  15  15
   90  45  30  75  30  45  30  15
   90  60  15  45  60  45  30  15
  105  30  15  30 105  30  15  30
  105  30  30  75  45  45  15  15
  105  45  15  30  90  45  15  15
  105  45  15  75  45  30  30  15
  120  30  15  60  75  30  15  15
		

Programs

  • Mathematica
    Remove[f];
    f[n_Integer] := Do[
          If[A == B < n/2 - C, Continue[]];(* if A == B then C >= H *)
          If[A == B == n/2 - C || C == D == n/2 - B, Continue[]];(* remove kite *)
          F = n/\[Pi] ArcTan[(Sin[d] Sin[a + b])/(Sin[a] Sin[c] Sin[e]) -
               Cot[e], 1] /. Thread[{a, b, c, d, e} -> \[Pi]/n {A, B, C, D, E}];
          F = Round[F, 10^-6];
          If[A < F, Continue[]];
          If[GCD[A, B, C, D, E, F] != 1, Continue[]];
          If[A == E && B < F, Continue[]];(* if A == E then B >= F *)
          If[A == F && B < E, Continue[]];(* if A == F then B >= E *)
          {A, B, C, D, E, F, B + C - F, D + E - A} // Sow;
          , {A, n/4 // Ceiling, n - 3}
          , {B, Max[1, n - 3 A + 2], Min[A, n - A - 2]}(* B <= A and C < A and H < A *)
          , {C, Max[1, n - 2 A - B + 1], Min[A - 1, n - A - B - 1]}(* C < A and H < A *)
          , {D, n - A - B - C, A - 1}(* D < A and E <= A *)
          , {E, {n - B - C - D}}
          ] // Reap // Last // If[# == {}, {}, # // Last] &;
    Table[f[n] // Length, {n, 30}]
    (* 180/n f[n] /. n -> 18 // TableForm *)

A290931 Radius of a circle enclosing three mutually tangent circles, such that they have coprime integer radii and with collectively six distinct points of tangency.

Original entry on oeis.org

6, 6, 15, 18, 20, 21, 28, 35, 40, 40, 42, 42, 45, 45, 52, 54, 56, 63, 66, 66, 72, 75, 77, 88, 91, 95, 99, 100, 104, 105, 105, 110, 112, 117, 120, 126, 130, 143, 153, 153, 156, 160, 160, 165, 165, 168, 170, 175, 186, 187, 189, 190, 195, 196, 198, 198, 204, 208, 208
Offset: 1

Author

Albert Lau, Aug 13 2017

Keywords

Comments

Descartes's theorem: 4 kissing circles with radii a,b,c,d satisfy
(1/a + 1/b + 1/c + 1/d)^2 = 2 (1/a^2 + 1/b^2 + 1/c^2 + 1/d^2).
When the largest circle encloses other 3 circles, its radius is negative.
If all circles are tangent to each other at the same point, Descartes's theorem does not apply. In this case, all circles can have any radius.

Examples

			The table gives the first 8 examples:
   a  b  c  d
  == == == ==
   6  3  2  1
   6  3  3  2
  15 10  3  2
  18  9  8  8
  20 12  5  3
  21 14  7  6
  28 21  4  3
  35 15 14  6
		

Crossrefs

Cf. A290508 (4 circles tangent externally).

Programs

  • Mathematica
    aMax = 150; (* WARNING: O(n^3) *)
    Do[
         If[x \[NotElement] Rationals, Continue[]];
         {d1, d2} = 1/(-(1/a) + 1/b + 1/c + {1, -1} 2 x);
         If[GCD[a, b, c, d1] == 1, {a, b, c, d1} // Sow];
         If[d2 > c || d2 == d1, Continue[]];
         If[GCD[a, b, c, d2] == 1, {a, b, c, d2} // Sow];
         , {a, aMax}, {b, 2, a - 2}, {c, Min[b, a - b]}
         , {x, {Sqrt[(-a + b + c)/(-a b c)]}}] // Reap // Last // Last // TableForm

Extensions

Description clarified by Ray Chandler, Aug 19 2017

A290508 Radius of largest circle among 4 circles each of which kisses the other three externally, and for which the radii are mutually coprime integers.

Original entry on oeis.org

12, 15, 24, 63, 69, 70, 72, 80, 105, 120, 120, 132, 153, 168, 198, 216, 231, 234, 238, 252, 264, 264, 270, 275, 280, 285, 290, 315, 336, 390, 392, 420, 429, 504, 504, 520, 539, 544, 567, 585, 595, 624, 627, 658, 658, 672, 672, 690, 693, 693, 696, 714, 715
Offset: 1

Author

Albert Lau, Aug 04 2017

Keywords

Comments

Descartes's theorem: 4 kissing circles with radii a,b,c,d satisfy
(1/a + 1/b + 1/c + 1/d)^2 = 2 (1/a^2 + 1/b^2 + 1/c^2 + 1/d^2).

Examples

			The table gives the first 8 examples:
   a  b  c  d
  == == == ==
  12 12  3  1
  15 15 10  2
  24 24  2  1
  63 56 56  9
  69 46 23  6
  70 30 21  5
  72 45 45  8
  80 80 36  9
		

Crossrefs

Cf. A290931 (4 mutually tangent circles, 1 circle enclosing 3).

Programs

  • Mathematica
    aMax = 150; (* WARNING: O(n^3) *)
    Do[
         If[d // IntegerQ // Not, Continue[]];
         If[GCD[a, b, c, d] > 1, Continue[]];
         {a, b, c, d} // Sow;
         , {a, aMax}, {b, a}, {c, b},
           {d, {1/(1/a + 1/b + 1/c + 2 Sqrt[(a + b + c)/(a b c)])}}
    ] // Reap // Last // Last // TableForm

Extensions

Corrected (inserted 63, 72, 234, 275) and extended by Ray Chandler, Aug 06 2017
Edited by N. J. A. Sloane, Aug 16 2017

A281224 Integer c such that (a^3 + b^3 - c^3)^2 = 1 where a,b,c are integers greater than 2.

Original entry on oeis.org

9, 12, 103, 144, 150, 172, 249, 495, 505, 577, 729, 738, 904, 1010, 1210, 1544, 1852, 1988, 2304, 2316, 3097, 3753, 4184, 5262, 5625, 5640, 6081, 6756, 8657, 8703, 9791, 9953, 11664, 11682, 12884, 14258, 16849, 18649, 21279, 21609, 21630, 24987, 29737, 31615
Offset: 1

Author

Albert Lau, Jan 18 2017

Keywords

Comments

a^3 + b^3 = c^3 has no nontrivial integer solution, this list gives the "near misses" which satisfy a^3 + b^3 = c^3 +- 1.
If a (or b) = 1, then b (or a) = c will always satisfy a^3 + b^3 = c^3 + 1 (trivially).
If any of a,b,c is 0, the equation can be reduced to x^3 + y^3 = 1^3 (possibly taking negative values), which has no nontrivial solutions.

Examples

			    a    b    c
  ---  ---  ---
    6    8    9
    9   10   12
   64   94  103
   71  138  144
   73  144  150
  135  138  172
E.g.: 135^3 + 138^3 = 172^3 - 1.
		

Programs

  • Mathematica
    n = 500;
    Do[If[a // IntegerQ,(*{a,b,c}*)c // Sow], {c, n}, {b, c/2^(1/3) // Ceiling, c - 1}, {a, ({-1, 1} + c^3 - b^3)^(1/3)}] // Reap // Last // Last(*//TableForm*)

A274550 The curvature of smallest circle among 4 mutually tangent(externally) circles with integer curvature and primitive (share no common factor).

Original entry on oeis.org

12, 15, 23, 24, 28, 33, 34, 35, 38, 39, 40, 42, 45, 47, 50, 52, 53, 56, 57, 58, 59, 60, 61, 62, 63, 63, 64, 66, 69, 71, 72, 72, 73, 76, 77, 77, 79, 80, 81, 82, 82, 83, 84, 84, 85, 86, 87, 87, 88, 90, 91, 91, 94, 94, 95, 95, 96, 96, 97, 98, 98, 99, 99
Offset: 1

Author

Albert Lau, Jul 03 2016

Keywords

Comments

4 mutually tangent circles satisfy 2 (a^2 + b^2 + c^2 + d^2) = (a + b + c + d)^2 where a,b,c,d are the curvatures.

Examples

			a,  b,  c, d
12, 4,  1, 1
15, 3,  2, 2
23, 6,  3, 2
24, 12, 1, 1
28, 9,  4, 1
		

Programs

  • Mathematica
    aMax = 100;
    Do[
        If[GCD[a, b, c] > 1, Continue[]];
        d = a + b + c - 2 Sqrt[a b + a c + b c];
        If[d // IntegerQ // Not, Continue[]];
        (*{a,b,c,d}*)a // Sow;
        , {a, aMax}
        , {b, (2 a)/Sqrt[3] - a // Ceiling, (Sqrt[a] - 1)^2}
        , {c,(a-b)^2/(4(a+b))//Ceiling,Min[b,(Sqrt[a]-Sqrt[b])^2-1//Ceiling]}
    ] // Reap // Last // Last(*//TableForm*)
    d =.;

A273771 Integer area of primitive tangential quadrilateral with integer sides, integer inradius and rational diagonals.

Original entry on oeis.org

168, 408, 420, 528, 588, 600, 660, 1008
Offset: 1

Author

Albert Lau, Jun 03 2016

Keywords

Comments

A tangential quadrilateral is a quadrilateral whose sides are all tangent to a single circle within the quadrilateral. This circle is called the incircle of the quadrilateral or its inscribed circle, its center is the incenter and its radius is called the inradius.
The area S of a tangential quadrilateral is given by S = r s where s is the semiperimeter and r is the inradius.
The sides of a tangential quadrilateral satisfy s = a + c = b + d where a,c and b,d are opposite sides.
Let D^2 = a b c d - S^2 (D can be positive or negative), then the distance from the tangent point on a(or b) to the vertex point between a,b is given by (ab-D)/s. Similar formula is given for changing a-b to b-c, c-d and d-a.
As a consequences of above formula, a b c d >= S^2.
The diagonal separating ad and bc is p=Sqrt[(a-d)^2+(4S^2)/(a d+b c+2D)]
The diagonal separating ab and cd is q=Sqrt[(a-b)^2+(4S^2)/(a b+c d-2D)]

Examples

			a,   b,   c,  d,  S,    r,  p,   q
15,  15,  13, 13, 168,  6,  14,  24
26,  26,  25, 25, 408,  8,  17,  48
25,  25,  17, 17, 420,  10, 28,  30
26,  26,  22, 22, 528,  11, 40,  132/5
28,  28,  21, 21, 588,  12, 35,  168/5
25,  25,  25, 25, 600,  12, 40,  30
39,  30,  16, 25, 660,  12, 34,  39
102, 102, 10, 10, 1008, 9,  104, 252/13
		

Programs

  • Mathematica
    SMax=500;
    Do[
      If[a==c&&\[CapitalDelta]<0,Continue[]];
      If[GCD[a,b,s,r]>1,Continue[]];
      If[b c+\[CapitalDelta]<=0||c d-\[CapitalDelta]<=0,Continue[]];
      If[!{p=Sqrt[(a-d)^2+(4S^2)/(a d+2\[CapitalDelta]+b c)],
           q=Sqrt[(a-b)^2+(4S^2)/(a b-2\[CapitalDelta]+c d)]
          }\[Element]Rationals,Continue[]];
      S(*{a,b,c,d,S,r,\[CapitalDelta],p,q}*)//Sow;
      ,{S,SMax},{s,S//Divisors//Select[#,#^2>=4S&]&},{r,{S/s}}
      ,{a,s/2//Ceiling,s},{c,{s-a}}
      ,{b,s/2//Ceiling,a},{d,{s-b}}
      ,{\[CapitalDelta],Select[{1,-1}Sqrt[a b c d-S^2],IntegerQ]//Union}
    ]//Reap//Last//Last(*//TableForm*)
    {p,q}=.;

A273752 Integer area of primitive bicentric quadrilateral with integer side, rational inradius and rational circumradius. Excluding right kites.

Original entry on oeis.org

7140, 16380, 87780, 1543668, 1697892, 4444440, 5858580
Offset: 1

Author

Albert Lau, May 29 2016

Keywords

Comments

Bicentric quadrilaterals have the following properties:
1. a+c = b+d = s where s is the semiperimeter;
2. A+C = B+D = 180 degrees;
2. Area S = sqrt(a b c d);
3. Circumradius R = sqrt(a*b + c*d)*sqrt(a*c + b*d)*sqrt(a*d + b*c)/S;
4. Inradius r = S/s (it follows that r is always rational if sides and area are integers);
5. Length of the diagonal separating a-b and c-d is (4S*R)/(a*b + c*d), the other diagonal can be obtained by swapping b,c or swapping b,d. It follows that all diagonals are rational iff a,b,c,d,R,S are rationals.
There are only 7 primitive cases which are not right kites for S < 10^7.
From empirical observation, the area seems to be a multiple of 84. (If proven, the program could be modified to run 84 times as fast.)
Special cases of bicentric quadrilaterals are right kites and isosceles trapezium.
Integer right kites can be generated by joining two (a,b,c) Pythagorean triangles, which gives S=a b/2, R=c/2, r=ab/(a+b+c).
Integer isosceles trapezium is impossible. Proof:
1. Let the sides of integer isosceles trapezium be (s-t,s,s+t,s);
2. S = s*sqrt(s^2 - t^2) and R = 2*s^2*sqrt(2s^2 - t^2)/S;
3. s^2 - t^2 and 2s^2 - t^2 are perfect squares;
4. Let u^2 = 2s^2 - t^2, v^2 = s^2 - t^2;
5. t^2,s^2,u^2 is an arithmetic progression with common difference = v^2;
6. Fermat's right triangle theorem states that no integer solution exists, except v=0 which corresponds to (0,s,2s,s), a degenerate quadrilateral. QED.

Examples

			All examples with S < 10^7:
a,    b,    c,    d,    S,       R,      r
204,  140,  85,   21,   7140,    442,    476/15
315,  260,  91,   36,   16380,   650,    140/3
440,  399,  231,  190,  87780,   1885/2, 418/3
2397, 1564, 1316, 483,  1543668, 4810,   128639/240
4756, 3451, 1428, 123,  1697892, 15130,  348
2849, 2184, 2145, 1480, 4444440, 6290,   3080/3
5460, 5365, 1131, 1036, 5858580, 11050,  7215/8
		

Programs

  • Mathematica
    SMin=7140;
    SMax=16380(*WARNING: runs very slow*);
    dS=1(*assuming S mod 84 = 0, set to 84 to run faster*);
    Do[
      s=(a+b)/2+Sqrt[(a-b)^2/4+S^2/(a b)];
      If[s//IntegerQ//Not,Continue[]];
      If[GCD[a,b,s]>1,Continue[]];
      R=(Sqrt[#1#2+#3#4]Sqrt[#1#3+#2#4]Sqrt[#1#4+#2#3])/S&[a,b,s-b,s-a];
      If[R\[NotElement]Rationals,Continue[]];
      S(*{a,b,s-b,s-a,S,R,S/s}*)//Sow;
      ,{S,Round[SMin,dS],SMax,dS}
      ,{a,S^2//Divisors//Select[#,S<#^2&&#
    				

A273691 Integer area of primitive cyclic quadrilaterals with integer sides and rational radius.

Original entry on oeis.org

12, 60, 108, 120, 120, 168, 192, 192, 234, 240, 300, 360, 360, 420, 420, 420, 420, 420, 420, 432, 540, 540, 588, 600, 660, 660, 714, 768, 840, 924, 960, 960, 966, 1008, 1008, 1008, 1080, 1080, 1080, 1092, 1134, 1200
Offset: 1

Author

Albert Lau, May 28 2016

Keywords

Comments

Given 4 segments a,b,c,d, there is a unique circumcircle such that these segments can be placed inside to form cyclic quadrilaterals. There are 3 ways to place these segments: abcd,acbd,adbc.
Primitive means a,b,c,d share no common factor.
The area S = sqrt[(s-a)(s-b)(s-c)(s-d)] where s=(a+b+c+d)/2 is the semiperimeter.
The circumradius R=Sqrt[a b+c d]*Sqrt[a c+b d]*Sqrt[a d+b c]/(4S)
The length of the diagonal separating a-b and c-d is (4S R)/(a b+c d), the other diagonal can be obtain by swapping b,c or swapping b,d.
It follows that if the sides and area are integers, then (any diagonal is rational) <=> (circumradius is rational) <=> (all diagonals are rational).
From empirical observation, the area seems to be a multiple of 6. (If so, the program could be modified to run 6 times as fast.)

Examples

			a,  b,  c,  d,  S,   r
4,  4,  3,  3,  12,  5/2
12, 12, 5,  5,  60,  13/2
14, 13, 13, 4,  108, 65/8
15, 15, 8,  8,  120, 17/2
21, 10, 10, 9,  120, 85/8
24, 24, 7,  7,  168, 25/2
21, 13, 13, 11, 192, 65/6
25, 15, 15, 7,  192, 25/2
24, 20, 15, 7,  234, 25/2
		

Programs

  • Mathematica
    SMax=1200;
    Do[
      x=S^2/(u v w);
      If[u+v+w+x//OddQ,Continue[]];
      If[v+w+x<=u,Continue[]];
      {a,b,c,d}=(u+v+w+x)/2-{x,w,v,u};
      If[GCD[a,b,c,d]>1,Continue[]];
      R=(Sqrt[v w+u x]Sqrt[u w+v x]Sqrt[u v+w x])/(4S);
      If[R\[NotElement]Rationals,Continue[]];
      S(*{a,b,c,d,"",S,R,"",(4S R)/(a d+b c),(4S R)/(a c+b d),(4S R)/(a b+c d)}*)//Sow;
      ,{S,1(*6*),SMax,1(*6*)}(*assuming S mod 6 = 0, set to 6 to run faster*)
      ,{u,S^2//Divisors//Select[#,S<=#^2&&#<=S&]&}
      ,{v,S^2/u//Divisors//Select[#,S^2<=u#^3&&u/3<#<=u&]&}
      ,{w,S^2/(u v)//Divisors//Select[#,S^2<=u v#^2&&(u-v)/2<#<=v&]&}
    ]//Reap//Last//Last(*//TableForm*)
    {S,R,x,a,b,c,d}=.;

A272390 Longest side of primitive Heronian tetrahedron with 4 congruent triangle faces.

Original entry on oeis.org

203, 888, 1804, 2431, 2873
Offset: 1

Author

Albert Lau, May 26 2016

Keywords

Comments

A Heronian tetrahedron or perfect tetrahedron is a tetrahedron whose edge lengths, face areas and volume are all integers.
Primitive tetrahedron means 4 edge lengths share no common factor.
Properties:
1. 3 pairs of opposite edge lengths are equal.
2. The perimeter must be an even number.
3. The faces are acute triangles, and cannot be isosceles triangle.
It is known that 5512,8484,11275,19695,32708,294175,683787 are in the sequence.

Examples

			Below shows some example: (might contains gap)
a,     b,     c,     S,         V
203,   195,   148,   13650,     611520
888,   875,   533,   223860,    37608480
1804,  1479,  1183,  870870,    214582368
2431,  2296,  2175,  2277660,   1403038560
2873,  2748,  1825,  2419950,   1355172000
5512,  5215,  1887,  4919460,   1377448800
8484,  6625,  6409,  20980050,  30546952800
11275, 10136, 8619,  41861820,  103147524480
19695, 16448, 13073, 106675680, 323290060800
32708, 31493, 24525, 363332970, 2685757314240
		

Programs

  • Mathematica
    heron=1/4Sqrt[(#1+#2+#3)(-#1+#2+#3)(#1-#2+#3)(#1+#2-#3)]&;
    cayley=1/24Sqrt[2Det[{
      {0,1,1,1,1},
      {1,0,#1^2,#2^2,#6^2},
      {1,#1^2,0,#3^2,#5^2},
      {1,#2^2,#3^2,0,#4^2},
      {1,#6^2,#5^2,#4^2,0}
    }]]&;
    aMin=203;
    aMax=2000(*WARNING:runs very slow*);
    Do[
      If[GCD[a,b,c]>1,Continue[]];
      S=heron[a,b,c];
      If[S//IntegerQ//Not,Continue[]];
      V=cayley[a,b,c,a,b,c];
      If[V//IntegerQ//Not,Continue[]];
      a(*{a,b,c,S,V}*)//Sow;
      ,{a,aMin,aMax}
      ,{b,a/Sqrt[2]//Ceiling,a-1}
      ,{c,Mod[a+b,2,Floor[Sqrt[a^2-b^2]]+1],b-1,2}
    ]//Reap//Last//Last(*//TableForm*)
    {S,V}=.;
    (*
    (*this piece of code runs much faster but might contains gap*)
    mMax=100;
    Do[
      {a,b,c}={n(m^2+k^2),m(n^2+k^2),(m+n)(m n-k^2)};
      {a,b,c}={a,b,c}/GCD[a,b,c];
      V=cayley[a,b,c,a,b,c];
      If[V//IntegerQ//Not,Continue[]];
      a(*{a,b,c,heron[a,b,c],V}*)//Sow
      ,{m,mMax}
      ,{n,m-1}
      ,{k,Floor[Sqrt[(m^2 n)/(2m+n)]+1],n-1}
    ]//Reap//Last//Last//Union(*TableForm*)
    {a,b,c,V}=.;
    *)

A272389 Longest side of primitive Heronian tetrahedron.

Original entry on oeis.org

117, 160, 203, 225, 318, 319, 319
Offset: 1

Author

Albert Lau, May 21 2016

Keywords

Comments

A Heronian tetrahedron or perfect tetrahedron is a tetrahedron whose edge lengths, face areas and volume are all integers.
Primitive tetrahedron means 6 sides don't share a common factor.

Examples

			see A272388
		

Crossrefs

Programs

  • Mathematica
    aMax=360(*WARNING:takes a long time*);
    heron=1/4Sqrt[(#1+#2+#3)(-#1+#2+#3)(#1-#2+#3)(#1+#2-#3)]&;
    cayley=1/24Sqrt[2Det[{
      {0,1,1,1,1},
      {1,0,#1^2,#2^2,#6^2},
      {1,#1^2,0,#3^2,#5^2},
      {1,#2^2,#3^2,0,#4^2},
      {1,#6^2,#5^2,#4^2,0}
    }]]&;
    Do[
      S1=heron[a,b,c];
      If[S1//IntegerQ//Not,Continue[]];
      Do[
        S2=heron[a,e,f];
        If[S2//IntegerQ//Not,Continue[]];
        Do[
          If[GCD[a, b, c, d, e, f] > 1, Continue[]];
          If[b==e&&c>f||b==f&&c>e,Continue[]];
          S3=heron[b,d,f];
          If[S3//IntegerQ//Not,Continue[]];
          S4=heron[c,d,e];
          If[S4//IntegerQ//Not,Continue[]];
          V=cayley[a,b,c,d,e,f];
          If[V//IntegerQ//Not,Continue[]];
          If[V==0,Continue[]];
          a//Sow(*{a,b,c,d,e,f,S1,S2,S3,S4,V}//Sow*);
        ,{d,Sqrt[((b^2-c^2+e^2-f^2)/(2a))^2+4((S1-S2)/a)^2]//Ceiling,Min[a,Sqrt[((b^2-c^2+e^2-f^2)/(2a))^2+4((S1+S2)/a)^2]]}];
      ,{e,a-b+1,b},{f,a-e+1,b}];
    ,{a,117,aMax},{b,a/2//Ceiling,a},{c,a-b+1,b}]//Reap//Last//Last