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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A097062 Interleave 2*n+1 and 2*n-1. 6
 1, -1, 3, 1, 5, 3, 7, 5, 9, 7, 11, 9, 13, 11, 15, 13, 17, 15, 19, 17, 21, 19, 23, 21, 25, 23, 27, 25, 29, 27, 31, 29, 33, 31, 35, 33, 37, 35, 39, 37, 41, 39, 43, 41, 45, 43, 47, 45, 49, 47, 51, 49, 53, 51, 55, 53, 57, 55, 59, 57, 61, 59, 63, 61, 65, 63, 67, 65, 69, 67, 71, 69, 73, 71, 75, 73, 77, 75, 79, 77, 81, 79, 83, 81, 85, 83, 87, 85 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Partial sums are A097063, whose pairwise sums are A002061. Binomial transform is A097064. 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.: (1-2*x+3*x^2)/((1-x^2)*(1-x)). a(n) = (2*n-1)/2 + 3*(-1)^n/2. a(n) = 2*(n-1) - a(n-1), with a(0)=1. - Vincenzo Librandi, Nov 16 2010 a(n) = n - 2 + 3*((n-1) mod 2). - Lechoslaw Ratajczak, May 21 2021 a(n) = a(n-1)+a(n-2)-a(n-3). - Wesley Ivan Hurt, May 21 2021 MATHEMATICA LinearRecurrence[{1, 1, -1}, {1, -1, 3}, 100] (* Amiram Eldar, May 21 2021 *) PROG (Haskell) import Data.List (transpose) a097062 n = a097062_list !! n a097062_list = concat \$ transpose [a005408_list, (-1) : a005408_list] -- Reinhard Zumkeller, Apr 16 2015 (PARI) a(n)=(2*n-1)/2+3*(-1)^n/2 \\ Charles R Greathouse IV, Oct 07 2015 (PARI) Vec((1-2*x+3*x^2)/((1-x^2)*(1-x)) + O(x^100)) \\ Altug Alkan, Nov 13 2015 (Magma) [(2*n-1)/2 + 3*(-1)^n/2 : n in [0..100]]; // Wesley Ivan Hurt, May 22 2021 CROSSREFS Cf. A005408, A097063, A097064. Sequence in context: A089654 A233526 A344674 * A350948 A324894 A200498 Adjacent sequences: A097059 A097060 A097061 * A097063 A097064 A097065 KEYWORD sign,easy AUTHOR Paul Barry, Jul 22 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.

Last modified December 9 17:12 EST 2022. Contains 358702 sequences. (Running on oeis4.)