login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A168269 a(n) = 2*n - (-1)^n. 3
3, 3, 7, 7, 11, 11, 15, 15, 19, 19, 23, 23, 27, 27, 31, 31, 35, 35, 39, 39, 43, 43, 47, 47, 51, 51, 55, 55, 59, 59, 63, 63, 67, 67, 71, 71, 75, 75, 79, 79, 83, 83, 87, 87, 91, 91, 95, 95, 99, 99, 103, 103, 107, 107, 111, 111, 115, 115, 119, 119, 123, 123, 127, 127, 131, 131 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

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

FORMULA

G.f.: x*(3 + x^2)/( (1+x)*(x-1)^2 ). - R. J. Mathar, Jan 05 2011

a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 16 2013

E.g.f.: (-1 + exp(x) + 2*x*exp(2*x))*exp(-x). - G. C. Greubel, Jul 16 2016

MATHEMATICA

CoefficientList[Series[(3 + x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 16 2013 *)

LinearRecurrence[{1, 1, -1}, {3, 3, 7}, 50] (* G. C. Greubel, Jul 16 2016 *)

PROG

(MAGMA) [2*n-(-1)^n: n in [1..70]]; // Vincenzo Librandi, Sep 16 2013

(PARI) a(n)=2*n-(-1)^n \\ Charles R Greathouse IV, Jul 16 2016

CROSSREFS

Cf. A004767.

Sequence in context: A302446 A109579 A109580 * A326936 A336416 A128508

Adjacent sequences:  A168266 A168267 A168268 * A168270 A168271 A168272

KEYWORD

nonn,easy

AUTHOR

Vincenzo Librandi, Nov 22 2009

EXTENSIONS

New definition by R. J. Mathar, Jan 05 2011

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 23 17:19 EDT 2021. Contains 347618 sequences. (Running on oeis4.)