OFFSET
1,1
COMMENTS
For n>1 this linear recurrence generates Heronian triangles whose sides are a(n), a(n)-4, a(n)/2-1 and whose area K = (a(n)-2)*sqrt(15(a(n)-10)(a(n)+6))/16. When a(n) = 2p and p is an odd prime then 2p-tau(2p) = a(n)-4 and phi(2p) = a(n)/2-1, where tau=A000005 is the number of divisors and phi=A000010 the totient. Hence when a(n) = 2p for some odd prime p, it is a member of A268281.
LINKS
FORMULA
a(n) = 9a(n-1) - 9a(n-2) + a(n-3).
From Ilya Gutkovskiy, Apr 27 2016: (Start)
G.f.: -2*x*(5-28*x+17*x^2) / ( (x-1)*(x^2-8*x+1) )
a(n) = 2*(2*(4 + sqrt(15))*(4 - sqrt(15))^n - 2*(sqrt(15) - 4)*(4 + sqrt(15))^n + 1). (End)
EXAMPLE
a(2) = 34 because the triangle so formed has sides 34, 30, 16. It is Heronian with integer area 240 and is also Pythagorean. Because 34 = 2*17 and 17 is prime, it is also a member of A268281.
MATHEMATICA
LinearRecurrence[{9, -9, 1}, {10, 34, 250}, 24]
PROG
(PARI) Vec(2*x*(5-28*x+17*x^2)/(1-9*x+9*x^2-x^3) + O(x^99)) \\ Altug Alkan, Apr 28 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Frank M Jackson, Apr 27 2016
STATUS
approved