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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280261 Period 12 sequence [0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, ...]. 6
0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
LINKS
FORMULA
a(n) = (-1)^(n-1)*a(n-1) + a(n-2) with a(0) = 0 and a(1) = 1.
a(n) = A260192(n+1) = A117441(n+2) = A260190(n+4).
G.f.: x * (1 - x - x^2) / (1 - x^2 + x^4).
EXAMPLE
G.f. = x - x^2 - x^4 - x^5 - x^7 + x^8 + x^10 + x^11 + ...
MATHEMATICA
PadRight[{}, 100, {0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1}] (* Vincenzo Librandi, Dec 31 2016 *)
LinearRecurrence[{0, 1, 0, -1}, {0, 1, -1, 0}, 100] (* Harvey P. Dale, Feb 15 2017 *)
PROG
(Ruby)
def A(m, n)
i, a, b = 0, 0, 1
ary = [0]
while i < n
i += 1
a, b = b, b * m ** i + a
ary << a
end
ary
end
def A280261(n)
A(-1, n)
end
(Magma) &cat [[0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 1, 1]^^10]; // Vincenzo Librandi, Dec 31 2016
CROSSREFS
Cf. similar sequences with the recurrence q^(n-1)*a(n-1) + a(n-2) for n>1, a(0)=0 and a(1)=1: A280222 (q=-3), A280221 (q=-2), this sequence (q=-1), A000045 (q=1), A015473 (q=2), A015474 (q=3), A015475 (q=4), A015476 (q=5), A015477 (q=6), A015479 (q=7), A015480 (q=8), A015481 (q=9), A015482 (q=10), A015484 (q=11).
Sequence in context: A181932 A284792 A094217 * A174784 A092220 A011655
KEYWORD
sign,easy
AUTHOR
Seiichi Manyama, Dec 30 2016
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 April 24 13:41 EDT 2024. Contains 371957 sequences. (Running on oeis4.)