%I #160 Aug 12 2024 23:54:56
%S 1,1,3,4,8,12,21,33,55,88,144,232,377,609,987,1596,2584,4180,6765,
%T 10945,17711,28656,46368,75024,121393,196417,317811,514228,832040,
%U 1346268,2178309,3524577,5702887,9227464,14930352,24157816,39088169,63245985,102334155
%N a(n) = Fibonacci(n+2) - (1-(-1)^n)/2.
%C Equals row sums of triangle A173284. - _Gary W. Adamson_, Feb 14 2010
%C The Kn21 sums (see A180662 for definition) of the 'Races with Ties' triangle A035317 produce this sequence. - _Johannes W. Meijer_, Jul 20 2011
%C a(n-1), for n >= 1, gives the number of compositions of n with relative prime parts, and parts not exceeding 2. See the row sums of triangle A030528 where for even n the leading 1 is missing. - _Wolfdieter Lang_, Jul 27 2023
%H Reinhard Zumkeller, <a href="/A052952/b052952.txt">Table of n, a(n) for n = 0..1000</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=1023">Encyclopedia of Combinatorial Structures 1023</a>
%H K. Kuhapatanakul, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Kuhapatanakul/kuha4.html">On the Sums of Reciprocal Generalized Fibonacci Numbers</a>, J. Int. Seq. 16 (2013) #13.7.1, eq (1).
%H Steven Linton, James Propp, Tom Roby, and Julian West, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Roby/roby4.html">Equivalence Classes of Permutations under Various Relations Generated by Constrained Transpositions</a>, Journal of Integer Sequences, Vol. 15 (2012), #12.9.1.
%H H. Ohtsuka and S. Nakamura, <a href="https://www.fq.math.ca/Papers1/46_47-2/Ohtsuka_Nakamura.pdf">On the sum of reciprocal sums of Fibonacci numbers</a>, Fibonacci Quart. 46/47 (2008/2009), 153-159.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-1,-1).
%F G.f.: 1/((1-x-x^2)*(1-x^2)).
%F a(n) = A074331(n+1).
%F a(n) = A054450(n+1, 1) (second column of triangle).
%F a(n) = 2*a(n-2) + a(n-3) + 1, with a(0)=1, a(1)=1, a(2)=3.
%F a(n) = Sum_{alpha=RootOf(-1+z+z^2)} (3+alpha)*alpha^(-1-n)/3 - Sum_{beta=RootOf(-1+z^2)} beta^(-1-n)/2.
%F a(2*k) = Sum_{j=0..k} F(2*j+1) = F(2*(k+1)) for k >= 0; a(2*k-1) = Sum_{j=0..k} F(2*j) = F(2*k+1)-1 for k >= 1 (F = A000045, Fibonacci numbers).
%F a(n) = a(n-1) + a(n-2) + (1+(-1)^n)/2.
%F a(n) = Sum_{k=0..floor(n/2)} binomial(n-k+1, k). - _Paul Barry_, Oct 23 2004
%F a(n) = floor(phi^(n+2) / sqrt(5)), where phi is the golden ratio: phi = (1+sqrt(5))/2. - _Reinhard Zumkeller_, Apr 19 2005
%F a(n) = Fibonacci(n+1) + a(n-2) with n>1, a(0)=a(1)=1. - _Zerinvary Lajos_, Mar 17 2008
%F a(n) = floor(Fibonacci(n+3)^2/Fibonacci(n+4)). - _Gary Detlefs_, Nov 29 2010
%F a(n) = (A001595(n+3) - A066983(n+4))/2. - _Gary Detlefs_, Dec 19 2010
%F a(4*n) = F(4*n+2); a(4*n+1) = F(4*n+3) - 1; a(4*n+2) = F(4*n+4); a(4*n+3) = F(4*n+5) - 1. - _Johannes W. Meijer_, Jul 20 2011
%F a(n+1) = a(n) + a(n-1) + A059841(n+1). - _Reinhard Zumkeller_, Jan 06 2012
%F a(n) = floor(|F((1+i)*(n+2))|), n >= 0, with the complex Fibonacci function F: C -> C, z -> F(z) with F(z) := (exp(log(phi)*z) - exp(i*Pi*z)*exp(-log(phi)*z))/(2*phi-1) with the modulus |z|, the imaginary unit i and the golden section phi:=(1+sqrt(5))/2. A Conjecture: For F(z) see, e.g., the T. Koshy reference. ch. 45, p. 523, where F is called f, given in A000045. - _Wolfdieter Lang_, Jul 24 2012
%F 5*a(n) = (L(n+3)-1)*(L(n+4)+3) -14 -Sum_{k=0..n} L(k+1)*L(k+5) = (L(n+3)-1)*(L(n+4)+3) -L(2*n+7) +A168309(n), where L=A000032. - _J. M. Bergot_, Jun 13 2014
%F a(n) = floor(phi*Fibonacci(n+1)), where phi is the golden section. - _Michel Dekking_, Dec 02 2016
%F a(n) = -(-1)^n * a(-4-n) for all n in Z. - _Michael Somos_, Dec 03 2016
%F a(n) = Sum_{k=0..n} Sum_{i=0..n} C(n-k-1,k-i). - _Wesley Ivan Hurt_, Sep 21 2017
%F a(n) = floor(1/(Sum_{k>=n+4} 1/Fibonacci(k))) [Ohtsuka and Nakamura]. - _Michel Marcus_, Aug 09 2018
%F a(n) = floor(abs(chebyshevU(n/2, 3/2))). - _Federico Provvedi_, Feb 23 2022
%F E.g.f.: exp(x/2)*(5*cosh(sqrt(5)*x/2) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/5 - sinh(x). - _Stefano Spezia_, Mar 09 2024
%e G.f. = 1 + x + 3*x^2 + 4*x^3 + 8*x^4 + 12*x^5 + 21*x^6 + 33*x^7 + ...
%p A052952 :=proc(n)
%p option remember;
%p local t1;
%p if n <= 1 then
%p return 1 ;
%p fi:
%p if n mod 2 = 1 then
%p t1:=0
%p else
%p t1:=1;
%p fi:
%p procname(n-1)+procname(n-2)+t1;
%p end proc;
%p seq(A052952(n), n=0..40) ; # _N. J. A. Sloane_, May 25 2008
%t Table[Fibonacci[n+2] -(1-(-1)^n)/2, {n, 0, 40}] (* _Vincenzo Librandi_, Dec 02 2016 *)
%t Sum[(-1)^k*Fibonacci[Range[2,41], 1-k], {k,0,1}] (* _G. C. Greubel_, Oct 21 2019 *)
%t CoefficientList[Series[1/((1-x-x^2)*(1-x^2)),{x,0,40}],x] (* _Harvey P. Dale_, Sep 12 2020 *)
%o (PARI) {a(n) = fibonacci(n+2) - n%2};
%o (Haskell)
%o a052952 n = a052952_list !! n
%o a052952_list = 1 : 1 : zipWith (+)
%o a059841_list (zipWith (+) a052952_list $ tail a052952_list)
%o -- _Reinhard Zumkeller_, Jan 06 2012
%o (Magma) [Fibonacci(n+2)-(1-(-1)^n)/2: n in [0..40]]; // _Vincenzo Librandi_, Dec 02 2016
%o (Sage) [fibonacci(n+2) -(1-(-1)^n)/2 for n in (0..40)] # _G. C. Greubel_, Jul 10 2019
%o (GAP) List([0..40], n-> Fibonacci(n+2) -(1-(-1)^n)/2); # _G. C. Greubel_, Jul 10 2019
%Y Cf. A062114, A173284, A059841, A014217, A180662, A035317.
%Y Partial sums of A008346, first differences of A129696.
%Y Cf. also A000032, A000045, A030528.
%Y Cf. A001595, A054450, A066983, A074331, A168309.
%K nonn,easy
%O 0,3
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E Additional formulas and more terms from _Wolfdieter Lang_, May 02 2000
%E Better description from _Olivier GĂ©rard_, Jun 05 2001