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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165192 a(0) = 1, a(1) = 2, a(3) = 3, a(n) = a(n-1) - a(n-3). 0
1, 2, 3, 2, 0, -3, -5, -5, -2, 3, 8, 10, 7, -1, -11, -18, -17, -6, 12, 29, 35, 23, -6, -41, -64, -58, -17, 47, 105, 122, 75, -30, -152, -227, -197, -45, 182, 379, 424, 242, -137, -561, -803, -666, -105, 698, 1364, 1469, 771, -593, -2062, -2833, -2240, -178 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..53.

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

FORMULA

a(n) = (-1)^n*A104771(n). G.f.: (1+x+x^2)/(1-x+x^3).

EXAMPLE

a(3) = 2 because 2 = 3 - 1 where the 1, 3 on the right of the equals sign are the first and third terms of the series.

MATHEMATICA

LinearRecurrence[{1, 0, -1}, {1, 2, 3}, 80] (* Harvey P. Dale, Apr 13 2012 *)

PROG

(Python) series = [1, 2, 3] for i in range(2, 30): .series.append((series[i] - series[i-1])+(series[i-1]-series[i-2])) print series

CROSSREFS

Cf. A104771

Sequence in context: A269735 A056619 A239579 * A104771 A056888 A286297

Adjacent sequences:  A165189 A165190 A165191 * A165193 A165194 A165195

KEYWORD

easy,sign

AUTHOR

Ben Paul Thurston, Sep 06 2009

EXTENSIONS

Offset corrected and recurrence simplified by R. J. Mathar, Sep 08 2009

More terms from Harvey P. Dale, Apr 13 2012

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 18 02:54 EST 2017. Contains 294840 sequences.