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

 

Logo

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!)
A177143 Pasquale's sequence: a(n) = 2a(n-1) + (-1)^n*floor(n/2), with a(1)=1. 0
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

Table of n, a(n) for n=1..34.

Index entries for linear recurrences with constant coefficients, signature (1,3,-1,-2).

FORMULA

a(n) = (1/2)*2^n + 2^n*Sum{k=1..n}{floor(k/2)*(-1/2)^k}, n>=1. - Paolo P. Lava, May 28 2010

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

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 A013498

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 27 06:50 EST 2022. Contains 358362 sequences. (Running on oeis4.)