login
G.f.: (3+x+x^2+2*x^3)/(1-x^2-x^4).
1

%I #17 Aug 23 2024 22:51:06

%S 3,1,4,3,7,4,11,7,18,11,29,18,47,29,76,47,123,76,199,123,322,199,521,

%T 322,843,521,1364,843,2207,1364,3571,2207,5778,3571,9349,5778,15127,

%U 9349,24476,15127,39603,24476,64079,39603,103682,64079,167761,103682,271443,167761

%N G.f.: (3+x+x^2+2*x^3)/(1-x^2-x^4).

%C a(2*n) = A000204(n+2), a(2*n+1) = A000204(n+1); a(2*n+1) = a(2*n-1) for n > 0. _Reinhard Zumkeller_, Aug 03 2013

%H Reinhard Zumkeller, <a href="/A082587/b082587.txt">Table of n, a(n) for n = 0..10000</a>

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

%F a(n) = A000204(floor(n/2) + 2 - n mod 2). - _Reinhard Zumkeller_, Aug 03 2013

%t CoefficientList[Series[(3+x+x^2+2x^3)/(1-x^2-x^4),{x,0,50}],x] (* or *) LinearRecurrence[{0,1,0,1},{3,1,4,3},50] (* _Harvey P. Dale_, Apr 09 2023 *)

%o (Haskell)

%o import Data.List (transpose)

%o a082587 n = a082587_list !! n

%o a082587_list = concat $ transpose [tail a000204_list, a000204_list]

%o -- _Reinhard Zumkeller_, Aug 03 2013

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_, May 13 2003