A154955 a(1) = 1, a(2) = -1, followed by 0, 0, 0, ... .
1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1).
Crossrefs
Programs
-
Mathematica
Join[{1, -1}, 0 Range[3, 100]] (* Wesley Ivan Hurt, Jun 22 2024 *) PadRight[{1,-1},120,0] (* Harvey P. Dale, Dec 10 2024 *)
-
PARI
A154955(n)=(n==1)-(n==2) \\ M. F. Hasler, Jan 13 2012
Formula
G.f.: A(x) = x - x^2 = x / (1 + x / (1 - x)). - Michael Somos, Jan 03 2013
a(n) = (2/sqrt(3))*sin((2*Pi/3)*n!). - Lorenzo Pinlac, Jan 16 2022
a(n) = [n = 1] - [n = 2], where [] is the Iverson bracket. - Wesley Ivan Hurt, Jun 22 2024
Multiplicative with a(2) = -1, a(2^e) = 0 if e > 1, a(p^e) = 0 if p > 2. - Antti Karttunen, Dec 17 2024
Extensions
Keyword:mult added by Antti Karttunen, Dec 17 2024
Comments