OFFSET
1,1
COMMENTS
The sides of a primitive 120-degree integer triangle.
LINKS
Colin Barker, Table of n, a(n) for n = 1..9999
Wikipedia, Eisenstein triple
EXAMPLE
Triples (a,b,c) begin:
3, 5, 7;
5, 16, 19;
7, 8, 13;
7, 33, 37;
9, 56, 61;
...
PROG
(PARI)
pt120(a) = {
my(L=List(), n=-3*a^2, f, g, b, c);
fordiv(n, f,
g=n\f;
if(f>g && (g+f)%2==0 && (f-g)%4==0,
c=(f-g)\4; b=((f+g)\2-a)\2;
if(b>0 && a<b && gcd(a, b)==1, listput(L, [a, b, c]))
)
);
Vec(L)
}
concat(concat(vector(30, a, pt120(a))))
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Colin Barker, Nov 26 2015
STATUS
approved