OFFSET
1,1
COMMENTS
This sequence contains every integer larger than 8. - Nathaniel Johnston, Oct 06 2013
LINKS
Wikipedia, Integer triangle
Kival Ngaokrajang, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (2, -1).
FORMULA
a(n) = n+4 for n>4.
a(n) = 2*a(n-1)-a(n-2) for n>6.
G.f.: -x*(x^5-x^4+x^2+x-3) / (x-1)^2.
EXAMPLE
12 appears in the sequence because there exists a 120-degree triangle with sides 12, 20 and 28.
PROG
(PARI)
\\ Gives values of A not exceeding amax.
\\ e.g. t120a(20) gives [3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
t120a(amax) = {
v=pt120a(amax);
s=[];
for(i=1, #v,
for(m=1, amax\v[i],
if(v[i]*m<=amax, s=concat(s, v[i]*m))
)
);
vecsort(s, , 8)
}
\\ Gives values of A not exceeding amax in primitive triangles.
\\ e.g. pt120a(20) gives [3, 5, 7, 9, 11, 13, 15, 16, 17, 19]
pt120a(amax) = {
s=[];
for(m=1, (amax-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, a=b);
if(a<=amax, s=concat(s, a))
)
)
);
vecsort(s, , 8)
}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Oct 06 2013
STATUS
approved