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”).

-1 followed by infinitely many 1's.
3

%I #26 Jan 03 2024 08:48:26

%S -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,

%T 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,

%U 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

%N -1 followed by infinitely many 1's.

%C Up to the sign of a(0), the same as the "all ones" sequence A000012. - _M. F. Hasler_, May 30 2020

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1).

%F G.f.: (2x-1)/(1-x). - _Philippe Deléham_, Mar 19 2009

%F a(n) = (-1)^A000007(n) = (-1)^[n=0], where [.] is the Iverson bracket. - _M. F. Hasler_, May 30 2020

%t PadRight[{-1},120,1] (* _Harvey P. Dale_, Apr 05 2023 *)

%o (PARI) a(n)=if(n,1,-1) \\ _Charles R Greathouse IV_, Jun 13 2013

%o (PARI) apply( {A158388(n)=1-!n*2}, [0..90]) \\ _M. F. Hasler_, May 30 2020

%Y Cf. A000012, A000007.

%K sign,mult,easy

%O 0,1

%A _Jaroslav Krizek_, Mar 17 2009