OFFSET
0,1
COMMENTS
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
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1).
FORMULA
a(n) = A000204(floor(n/2) + 2 - n mod 2). - Reinhard Zumkeller, Aug 03 2013
MATHEMATICA
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 *)
PROG
(Haskell)
import Data.List (transpose)
a082587 n = a082587_list !! n
a082587_list = concat $ transpose [tail a000204_list, a000204_list]
-- Reinhard Zumkeller, Aug 03 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 13 2003
STATUS
approved