The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A006904 a(n) = a(n-1) + 2*a(n-2) + (-1)^n. (Formerly M3254) 1
 1, 1, 4, 5, 14, 23, 52, 97, 202, 395, 800, 1589, 3190, 6367, 12748, 25481, 50978, 101939, 203896, 407773, 815566, 1631111, 3262244, 6524465, 13048954, 26097883, 52195792, 104391557 (list; graph; refs; listen; history; text; internal format)
 OFFSET 4,3 REFERENCES R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 327. R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2d edition 1994, p. 341. N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS Table of n, a(n) for n=4..31. Index entries for linear recurrences with constant coefficients, signature (0, 3, 2). FORMULA G.f.: x^4*(-x^2 - x - 1)/((1 + x)^2 (2 x - 1)) [corrected by Harvey P. Dale, Apr 22 2011] With offset 0: a(n) = 1/9*(7*2^n+(-1)^n*(3*n+2)); if b(1)=1, b(k) = 2*b(k-1)+(-1)^k*k, then for n>4, a(n)=b(n-4). - Benoit Cloitre, Oct 28 2002 a[0]=a[1]=1; a[2]=4; a[n]=3a[n-2]+2a[n-3] [From Harvey P. Dale, Apr 22 2011] MATHEMATICA LinearRecurrence[{0, 3, 2}, {1, 1, 4}, 41] (* or *) CoefficientList[Series[ (-x^2-x-1)/((1+x)^2 (2x-1)), {x, 0, 40}], x] (* Harvey P. Dale, Apr 22 2011 *) CROSSREFS Sequence in context: A246984 A306897 A348889 * A200177 A241863 A350527 Adjacent sequences: A006901 A006902 A006903 * A006905 A006906 A006907 KEYWORD nonn,easy AUTHOR Simon Plouffe and N. J. A. Sloane. STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 5 15:51 EDT 2023. Contains 363137 sequences. (Running on oeis4.)