OFFSET
0,1
COMMENTS
After the first two terms, there are no primes in this sequence. In fact:
a(12*k) is divisible by 5,
a(12*k+1) is divisible by 2,
a(12*k+2) is divisible by 3,
a(12*k+3) is divisible by 2,
a(12*k+4) is divisible by 7,
a(12*k+5) is divisible by 2,
a(12*k+6) is divisible by 3,
a(12*k+7) is divisible by 2,
a(12*k+8) is divisible by 11,
a(12*k+9) is divisible by 2,
a(12*k+10) is divisible by 3,
a(12*k+11) is divisible by 2.
Therefore, every term is divisible by 2, 3, 5, 7 or 11.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1).
FORMULA
From Colin Barker, Oct 11 2016: (Start)
G.f.: (5-8*x) / (1-2*x-x^2).
a(n) = ((1 + sqrt(2))^n*(-3 + 5*sqrt(2)) + (1 - sqrt(2))^n*(3 + 5*sqrt(2)))/(2*sqrt(2)). (End)
MATHEMATICA
CoefficientList[Series[(5 - 8*x)/(1 - 2*x - x^2), {x, 0, 30}], x] (* Wesley Ivan Hurt, Oct 11 2016 *)
a[0] = 5; a[1] = 2; a[n_] := a[n] = 2 a[n - 1] + a[n - 2]; Array[a, 31, 0] (* or *) LinearRecurrence[{2, 1}, {5, 2}, 31] (* Robert G. Wilson v, Oct 12 2016 *)
PROG
(PARI) lista(n)=n++; my(v=vector(max(2, n))); v[1]=5; v[2]=2; for(i=3, n, v[i]=2*v[i-1]+v[i-2]); v \\ David A. Corneth, Oct 11 2016
(PARI) Vec((5-8*x)/(1-2*x-x^2) + O(x^40)) \\ Colin Barker, Oct 11 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bobby Jacobs, Oct 11 2016
EXTENSIONS
More terms from David A. Corneth, Oct 11 2016
STATUS
approved