OFFSET
1,1
LINKS
Wikipedia, Integer triangle
EXAMPLE
20 appears in the sequence because there exists a 120-degree triangle with sides 12, 20 and 28.
PROG
(PARI)
\\ Gives values of B not exceeding bmax.
\\ e.g. t120b(40) gives [5, 8, 10, 15, 16, 20, 24, 25, 30, 32, 33, 35, 39, 40]
t120b(bmax) = {
v=pt120b(bmax);
s=[];
for(i=1, #v,
for(m=1, bmax\v[i],
if(v[i]*m<=bmax, s=concat(s, v[i]*m))
)
);
vecsort(s, , 8)
}
\\ Gives values of B not exceeding bmax in primitive triangles.
\\ e.g. pt120b(40) gives [5, 8, 16, 24, 33, 35, 39]
pt120b(bmax) = {
s=[];
for(m=1, (bmax-1)\2,
for(n=1, m-1,
if((m-n)%3!=0 && gcd(m, n)==1,
a=m*m-n*n;
b=n*(2*m+n);
if(a>b, b=a);
if(b<=bmax, s=concat(s, b))
)
)
);
vecsort(s, , 8)
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Barker, Oct 06 2013
STATUS
approved