This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A097140 Interleave n and 1-n. 3
 0, 1, 1, 0, 2, -1, 3, -2, 4, -3, 5, -4, 6, -5, 7, -6, 8, -7, 9, -8, 10, -9, 11, -10, 12, -11, 13, -12, 14, -13, 15, -14, 16, -15, 17, -16, 18, -17, 19, -18, 20, -19, 21, -20, 22, -21, 23, -22, 24, -23, 25, -24, 26, -25, 27, -26, 28, -27, 29, -28, 30, -29, 31, -30, 32, -31 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS Partial sums are A097141. Binomial transform is x(1+x)/(1-2x), or A003945 with a leading 0. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (-1,1,1). FORMULA G.f. : x(1+2x)/((1-x)(1+x)^2); a(n)=3/4+(2n-3)(-1)^n/4. a(0)=0, a(1)=1, a(2)=1, a(n)=a(n-1)+a(n-2)+a(n-3) [From Harvey P. Dale, Mar 26 2012] G.f.: x*G(0)/(1+x) where G(k) = 1 + 2*x/(1 - x/(x + 2/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 21 2012 MATHEMATICA With[{nn=35}, Riffle[Range[0, nn], Range[1, -(nn-1), -1]]] (* or *) LinearRecurrence[ {-1, 1, 1}, {0, 1, 1}, 70] (* Harvey P. Dale, Mar 26 2012 *) PROG (Haskell) import Data.List (transpose) a097140 n = a097140_list !! n a097140_list = concat \$ transpose [a001477_list, map (1 -) a001477_list] -- Reinhard Zumkeller, Nov 27 2012 (PARI) a(n)=3/4+(2*n-3)*(-1)^n/4 \\ Charles R Greathouse IV, Sep 02 2015 CROSSREFS Cf. A001477. Sequence in context: A213633 A289436 A282745 * A028242 A030451 A241825 Adjacent sequences:  A097137 A097138 A097139 * A097141 A097142 A097143 KEYWORD easy,sign AUTHOR Paul Barry, Jul 29 2004 STATUS approved

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

Last modified July 17 16:58 EDT 2019. Contains 325107 sequences. (Running on oeis4.)