OFFSET
1,1
COMMENTS
In case the number k=-cos(C) is a rational number, the law of cosines, c^2=a^2+b^2+k*a*b, can be regarded as a Diophantine equation having positive integer solutions a,b,c satisfying a<=b. The terms "k-Pythagorean triple" and "primitive k-Pythagorean triple" generalize the classical terms corresponding to the case k=0.
Example: the first five (3/2)-Pythagorean triples are
(5,18,22),(6,11,16),(9,11,71),(10,36,44),(12,22,32);
the first five primitive (3/2)-Pythagorean triples are
(5,18,22),(6,11,16),(9,64,71),(13,138,148),(14,75,86).
...
If |k|>2, there is no triangle with sidelengths a,b,c satisfying c^2=a^2+b^2+k*a*b, but this equation is, nevertheless, a Diophantine equation for rational k.
...
Related sequences (k-Pythagorean triples):
k...(a(1),b(1),c(1))........a(n).....b(n).....c(n)
...
Related sequences (primitive k-Pythagorean triples):
k...(a(1),b(1),c(1))........a(n).....b(n).....c(n)
From Georg Fischer, Oct 26 2020: (Start)
The Mathematica program below has fixed limits (z7, z8, z9). Therefore, it misses higher values of b. For example, the following triples are do not show up in the corresponding sequences:
49: 29 1008 1051
31: 13 950 1013
This problem affects 62 of the 74 parameter combinations. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The first seven 1-Pythagorean triples (a,b,c), ordered as
described above, are as follows:
3,5,7........7^2 = 3^2 + 5^2 + 3*5
5,16,19.....19^2 = 5^2 + 16^2 + 5*16
6,10,14.....14^2 = 6^2 + 10^2 + 6*10
7,8,13
7,33,37
9,15,21
9,56,61
10,32,38
MAPLE
f:= proc(a) local F, r, u, b;
r:= 3*a^2;
nops(select(proc(t) local b; b:= (r/t - t - 2*a)/4;
(t + r/t) mod 4 = 0 and b::integer and b >= a end proc, numtheory:-divisors(3*a^2)));
end proc:
seq(a$f(a), a=1..100); # Robert Israel, Jul 04 2024
MATHEMATICA
z8 = 2000; z9 = 400; z7 = 100;
k = 1; c[a_, b_] := Sqrt[a^2 + b^2 + k*a*b];
d[a_, b_] := If[IntegerQ[c[a, b]], {a, b, c[a, b]}, 0]
t[a_] := Table[d[a, b], {b, a, z8}]
u[n_] := Delete[t[n], Position[t[n], 0]]
Table[u[n], {n, 1, 15}]
t = Table[u[n], {n, 1, z8}];
Flatten[Position[t, {}]]
u = Flatten[Delete[t, Position[t, {}]]];
x[n_] := u[[3 n - 2]];
Table[x[n], {n, 1, z7}] (* this sequence *)
y[n_] := u[[3 n - 1]];
Table[y[n], {n, 1, z7}] (* A195866 *)
z[n_] := u[[3 n]];
Table[z[n], {n, 1, z7}] (* A195867 *)
x1[n_] := If[GCD[x[n], y[n], z[n]] == 1, x[n], 0]
y1[n_] := If[GCD[x[n], y[n], z[n]] == 1, y[n], 0]
z1[n_] := If[GCD[x[n], y[n], z[n]] == 1, z[n], 0]
f = Table[x1[n], {n, 1, z9}];
x2 = Delete[f, Position[f, 0]] (* A195868 *)
g = Table[y1[n], {n, 1, z9}];
y2 = Delete[g, Position[g, 0]] (* A195869 *)
h = Table[z1[n], {n, 1, z9}];
z2 = Delete[h, Position[h, 0]] (* A195870 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 25 2011
EXTENSIONS
Name corrected by Robert Israel, Jul 04 2024
STATUS
approved