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

 

Logo
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
FORMULA
G.f.: x*(1 + 2*x)/((1 - x)*(1 + x)^2).
a(n) = 3/4 + (2*n - 3)*(-1)^n/4.
a(0)=0, a(1)=1, a(2)=1, a(n)=a(n-1)+a(n-2)+a(n-3). - 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
E.g.f.: ((3 + x)*sinh(x) - x*cosh(x))/2. - Stefano Spezia, Mar 07 2023
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
Sequence in context: A213633 A289436 A282745 * A028242 A030451 A241825
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)