login
a(n) = 5a(n-2) - 2a(n-4).
(Formerly M2489)
5

%I M2489 #49 Dec 27 2023 08:53:39

%S 0,1,1,3,5,13,23,59,105,269,479,1227,2185,5597,9967,25531,45465,

%T 116461,207391,531243,946025,2423293,4315343,11053979,19684665,

%U 50423309,89792639,230008587,409593865,1049196317,1868384047,4785964411

%N a(n) = 5a(n-2) - 2a(n-4).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Michael De Vlieger, <a href="/A005824/b005824.txt">Table of n, a(n) for n = 0..3036</a>

%H Milica Anđelić and Carlos M. da Fonseca, <a href="https://doi.org/10.1016/j.heliyon.2021.e07764">On the constant coefficients of a certain recurrence relation: A simple proof</a>, Heliyon (2021) Vol. 7, No. 8, e07764.

%H D. Panario, M. Sahin and Q. Wang, <a href="http://www.emis.de/journals/INTEGERS/papers/n78/n78.Abstract.html">A family of Fibonacci-like conditional sequences</a>, INTEGERS, Vol. 13, 2013, #A78.

%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.

%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992

%H J. Shallit, <a href="http://dx.doi.org/10.1016/S0747-7171(08)80160-5">On the worst case of three algorithms for computing the Jacobi symbol</a>, J. Symbolic Comput. 10 (1990), no. 6, 593-610.

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

%F Also a(n) = a(n-1) + 2a(n-2) if n is even, else a(n) = 2a(n-1) + a(n-2).

%F a(2n+1) = A052984(n). [Index corrected by _R. J. Mathar_, Apr 01 2009]

%F a(2n) = A107839(n-1). [_R. J. Mathar_, Apr 01 2009]

%p A005824:=-z*(2*z+1)*(z-1)/(1-5*z**2+2*z**4); [_Simon Plouffe_ in his 1992 dissertation.]

%t a[0] = 0; a[1] = 1; a[n_] := a[n] = If[ EvenQ[n], a[n - 1] + 2a[n - 2], 2a[n - 1] + a[n - 2]]; Table[a[n], {n, 0, 31}]

%t LinearRecurrence[{0,5,0,-2},{0,1,1,3},40] (* _Harvey P. Dale_, Jul 09 2015 *)

%Y Cf. A079162.

%K nonn

%O 0,4

%A _N. J. A. Sloane_, _Jeffrey Shallit_

%E Extended by _Robert G. Wilson v_, Dec 29 2002