OFFSET
1,1
COMMENTS
a(n) = {11} union {A000204(2+4*n)} for n=0,1,...
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (7,-1).
FORMULA
From Colin Barker, Jun 20 2017: (Start)
G.f.: x*(3 - 10*x - 56*x^2 + 8*x^3) / (1 - 7*x + x^2).
a(n) = (2^(-n)*((7+3*sqrt(5))^n*(-20+9*sqrt(5)) + (7-3*sqrt(5))^n*(20+9*sqrt(5)))) / sqrt(5) for n>2.
a(n) = 7*a(n-1) - a(n-2) for n>4. (End)
MAPLE
with(combinat, fibonacci):lst:={}:lst1:={}:nn:=5000:
for n from 1 to nn do:
lst:=lst union {2*fibonacci(n-1)+fibonacci(n)}:
od:
for m from 1 to nn do:
if {m^2+2} intersect lst = {m^2+2}
then
lst1:=lst1 union {m^2+2}:
else
fi:
od:
print(lst1):
MATHEMATICA
CoefficientList[Series[x*(3-10*x-56*x^2+8*x^3)/(1-7*x+x^2), {x, 0, 50}], x] (* or *) LinearRecurrence[{7, -1}, {3, 11, 18, 123}, 30] (* G. C. Greubel, Dec 21 2017 *)
Select[LucasL[Range[100]], IntegerQ[Sqrt[#-2]]&] (* Harvey P. Dale, Dec 31 2018 *)
PROG
(PARI) lista(nn) = for (n=0, nn, luc = fibonacci(n+1) + fibonacci(n-1); if (issquare(luc-2), print1(luc, ", "))); \\ Michel Marcus, Mar 29 2016
(PARI) Vec(x*(3 - 10*x - 56*x^2 + 8*x^3) / (1 - 7*x + x^2) + O(x^30)) \\ Colin Barker, Jun 20 2017
(Magma) I:=[3, 11, 18, 123]; [n le 4 select I[n] else 7*Self(n-1)-Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 21 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Aug 26 2014
EXTENSIONS
Corrected by Michel Marcus, Mar 29 2016
STATUS
approved