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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A177143 Pasquale's sequence: a(n) = 2a(n-1) + (-1)^n*floor(n/2), with a(1)=1. 1
 1, 3, 5, 12, 22, 47, 91, 186, 368, 741, 1477, 2960, 5914, 11835, 23663, 47334, 94660, 189329, 378649, 757308, 1514606, 3029223, 6058435, 12116882, 24233752, 48467517, 96935021, 193870056, 387740098, 775480211, 1550960407, 3101920830, 6203841644, 12407683305 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Paolo Xausa, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (1,3,-1,-2). FORMULA a(n) = 2*a(n-1) + n/2 if n is even; a(n) = 2*a(n-1) - (n-1)/2 if n is odd, with a(1)=1. - Vincenzo Librandi, Sep 30 2010 G.f.: -x*(-1-2*x+x^2+x^3) / ( (2*x-1)*(x-1)*(1+x)^2 ). - R. J. Mathar, Nov 18 2010 a(n) = 13*2^n/18 - 1/4 + (-1)^n*(n/6+1/36) = a(n-1) + 3*a(n-2) - a(n-3) - 2*a(n-4). - R. J. Mathar, Nov 18 2010 MATHEMATICA LinearRecurrence[{1, 3, -1, -2}, {1, 3, 5, 12}, 50] (* Paolo Xausa, Jan 04 2024 *) PROG (PARI) Vec(-x*(-1-2*x+x^2+x^3)/((2*x-1)*(x-1)*(1+x)^2) + O(x^40)) \\ Michel Marcus, Aug 15 2015 (PARI) first(m)=my(v=vector(m)); v[1]=1; for(i=2, m, v[i]=2*v[i-1]+(-1)^i*floor(i/2)); v; \\ Anders Hellström, Aug 15 2015 CROSSREFS Sequence in context: A263346 A034763 A183921 * A191391 A121482 A368858 Adjacent sequences: A177140 A177141 A177142 * A177144 A177145 A177146 KEYWORD nonn,easy AUTHOR Robert Wainwright (RWainwright(AT)Iona.edu), May 03 2010 EXTENSIONS Edited by N. J. A. Sloane, May 06 2010 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 February 25 16:57 EST 2024. Contains 370332 sequences. (Running on oeis4.)