login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053438 Expansion of (1+x+2*x^3)/((1-x)*(1-x^2)). 1
1, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31, 34, 35, 38, 39, 42, 43, 46, 47, 50, 51, 54, 55, 58, 59, 62, 63, 66, 67, 70, 71, 74, 75, 78, 79, 82, 83, 86, 87, 90, 91, 94, 95, 98, 99, 102, 103, 106, 107, 110, 111, 114, 115, 118, 119, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..5000

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

FORMULA

a(n) = 2*n -(1+(-1)^n))/2 (with a different offset). - Frank Ellermann, Feb 12 2002

a(n) = A042964(n), n>0. - R. J. Mathar, Oct 13 2008

MATHEMATICA

CoefficientList[Series[(1+x+2*x^3)/((1-x)*(1-x^2)), {x, 0, 50}], x] (* or *) Join[{1}, LinearRecurrence[{1, 1, -1}, {2, 3, 6}, 50]] (* G. C. Greubel, May 26 2018 *)

PROG

(PARI) a(n)=abs(n\2*4+n%2*3-1) \\ Charles R Greathouse IV, Dec 08 2011

(MAGMA) I:=[2, 3, 6]; [1] cat [n le 3 select I[n] else Self(n-1) +Self(n-2) -Self(n-3): n in [1..30]]; // G. C. Greubel, May 26 2018

CROSSREFS

Sequence in context: A299239 A107998 A276884 * A042964 A327220 A230375

Adjacent sequences:  A053435 A053436 A053437 * A053439 A053440 A053441

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Jan 12 2000

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 17 11:03 EDT 2019. Contains 327129 sequences. (Running on oeis4.)