OFFSET
1,2
COMMENTS
Old name was: A palindromic complexity sequence based on the Fibonacci numbers.
a(1)=1 gives more primes than a(1)=2 for some reason.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Petr Ambroz, Christiane Frougny, Zuzana Masakova and Edita Pelantova, Palindromic complexity of infinite words associated with simple Parry numbers, arXiv:math/0603608 [math.CO], 2006.
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
FORMULA
a(n) = a(n-1) + Fibonacci(n-2) + 2.
G.f.: x*(1-x^2-2*x^3)/((1-x)^2*(1-x-x^2)). - Colin Barker, Nov 08 2012
MAPLE
with(combinat); seq( 2*(n-1) + fibonacci(n), n=1..45); # G. C. Greubel, Dec 02 2019
MATHEMATICA
a[n_]:= a[n]= If[n==1, 1, a[n-1] + Fibonacci[n-2] +2]; Table[a[n], {n, 45}]
PROG
(PARI) a(n)=2*n-2+fibonacci(n) \\ Charles R Greathouse IV, Oct 03 2013
(Magma) [2*n-2+Fibonacci(n): n in [1..45]]; // Vincenzo Librandi, Oct 05 2013
(Sage) [2*(n-1) + fibonacci(n) for n in (1..45)] # G. C. Greubel, Dec 02 2019
(GAP) List([1..45], n-> 2*(n-1) + Fibonacci(n) ); # G. C. Greubel, Dec 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, May 12 2007
EXTENSIONS
New name from Gary Detlefs, Dec 31 2012
STATUS
approved