login
a(n) = 2^n - Fibonacci(n).
21

%I #60 Jan 31 2023 18:34:30

%S 1,1,3,6,13,27,56,115,235,478,969,1959,3952,7959,16007,32158,64549,

%T 129475,259560,520107,1041811,2086206,4176593,8359951,16730848,

%U 33479407,66987471,134021310,268117645,536356683,1072909784,2146137379,4292788987,8586410014

%N a(n) = 2^n - Fibonacci(n).

%C Binomial transform of (-1)^n*Fib(n)+1 = (-1)^n*A008346(n).

%C Number of compositions of n+1 that contain 1 as a part. - _Vladeta Jovovic_, Sep 26 2004

%C Generated from iterates of M * [1,1,1,...], where M = a tridiagonal matrix with [0,1,1,1,...] as the main diagonal, [1,1,1,...] as the superdiagonal and [1,0,0,0,...] as the subdiagonal. - _Gary W. Adamson_, Jan 05 2009

%C Starting with offset 1, generated from iterates of M * [1,1,1,...], M*ANS -> M*ANS,...; where M = = a tridiagonal matrix with (0,1,1,1,...) in the main diagonal, (1,1,1,...) in the superdiagonal and (1,0,0,0,...) in the subdiagonal. - _Gary W. Adamson_, Jan 04 2009

%C An elephant sequence, see A175655. For the central square 24 A[5] vectors, with decimal values between 11 and 416, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A027934 (without the leading 0). - _Johannes W. Meijer_, Aug 15 2010

%C a(n) = A000079(n+1) - A117591(n) = A117591(n) - 2 * A000045(n). - _Reinhard Zumkeller_, Aug 15 2013

%C Number of fixed points in all compositions of n+1. - _Alois P. Heinz_, Jun 18 2020

%H G. C. Greubel, <a href="/A099036/b099036.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..200 from Vincenzo Librandi)

%H M. Archibald, A. Blecher, and A. Knopfmacher, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Blecher/arch14.html">Fixed Points in Compositions and Words</a>, J. Int. Seq., Vol. 23 (2020), Article 20.11.1.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-2).

%F G.f.: (1 - x)^2/((1 - 2*x)*(1 - x - x^2)).

%F a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3).

%F a(n) = A101220(1,2,n+1) - A101220(1,2,n). - _Ross La Haye_, Aug 05 2005

%F a(n) = sum(t_1+2*t_2+...+n*t_n=n, multinomial(1+t_1+t_2+...+t_n, 1+t_1, t_2, ..., t_n). - _Mircea Merca_, Oct 09 2013

%F a(n) = Sum_{k=0..A003056(n+1)} k * A238350(n+1,k). - _Alois P. Heinz_, Jun 18 2020

%F E.g.f.: cosh(2*x) + sinh(2*x) - 2*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5). - _Stefano Spezia_, Jan 31 2023

%t Table[2^n-Fibonacci[n],{n,0,100}] (* _Vladimir Joseph Stephan Orlovsky_, May 02 2011 *)

%o (Magma) [2^n-Fibonacci(n): n in [0..35]]; // _Vincenzo Librandi_, May 03 2011

%o (Haskell)

%o a099036 n = a099036_list !! n

%o a099036_list = zipWith (-) a000079_list a000045_list

%o -- _Reinhard Zumkeller_, Aug 15 2013

%o (PARI) a(n)=2^n-fibonacci(n) \\ _Charles R Greathouse IV_, Sep 24 2015

%Y Cf. A000045, A000079, A003056, A008346, A027934, A101220, A117591, A175655, A212323, A238350.

%K easy,nonn

%O 0,3

%A _Paul Barry_, Sep 23 2004

%E More terms from _Ross La Haye_, Aug 05 2005