login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A158388
-1 followed by infinitely many 1's.
3
-1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
0,1
COMMENTS
Up to the sign of a(0), the same as the "all ones" sequence A000012. - M. F. Hasler, May 30 2020
FORMULA
G.f.: (2x-1)/(1-x). - Philippe Deléham, Mar 19 2009
a(n) = (-1)^A000007(n) = (-1)^[n=0], where [.] is the Iverson bracket. - M. F. Hasler, May 30 2020
MATHEMATICA
PadRight[{-1}, 120, 1] (* Harvey P. Dale, Apr 05 2023 *)
PROG
(PARI) a(n)=if(n, 1, -1) \\ Charles R Greathouse IV, Jun 13 2013
(PARI) apply( {A158388(n)=1-!n*2}, [0..90]) \\ M. F. Hasler, May 30 2020
CROSSREFS
Sequence in context: A119665 A121241 A122188 * A162285 A186035 A358766
KEYWORD
sign,mult,easy
AUTHOR
Jaroslav Krizek, Mar 17 2009
STATUS
approved