(PARI)
\\ Gives values of C not exceeding cmax.
\\ e.g. t60c(60) gives [8, 15, 16, 21, 24, 30, 32, 35, 40, 42, 45, 48, 55, 56, 60]
t60c(cmax) = {
v=pt60c(cmax);
s=[];
for(i=1, #v,
for(m=1, cmax\v[i],
if(v[i]*m<=cmax, s=concat(s, v[i]*m))
)
);
vecsort(s, , 8)
}
\\ Gives values of C not exceeding cmax in primitive triangles.
\\ e.g. pt60c(115) gives [8, 15, 21, 35, 40, 48, 55, 65, 77, 80, 91, 96, 99, 112]
pt60c(cmax) = {
s=[];
for(m=1, ceil(sqrt(cmax+1)),
for(n=1, m-1,
if((m-n)%3!=0 && gcd(m, n)==1,
if(2*m*n+m*m<=cmax, s=concat(s, 2*m*n+m*m))
)
)
);
vecsort(s, , 8)
}