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!)
A153881 1 followed by -1, -1, -1, ... . 30

%I #42 Dec 31 2023 10:22:22

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

%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

%N 1 followed by -1, -1, -1, ... .

%C Dirichlet inverse of A074206.

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

%F G.f: x*(1-2*x)/(1-x). - _Mats Granvik_, Mar 09 2009, rewritten _R. J. Mathar_, Mar 31 2010

%F a(n) = (-1)^A000040(n). - _Juri-Stepan Gerasimov_, Sep 10 2009

%F G.f.: x / (1 + x / (1 - 2*x)). - _Michael Somos_, Apr 02 2012

%F From _Wesley Ivan Hurt_, Jun 20 2014: (Start)

%F a(1) = 1; a(n) = -1, n > 1.

%F a(n) = 1 - 2*sign(n-1) = 1 - 2*A057427(n-1).

%F a(n) = (-1)^sign(1-n) = (-1)^A057427(1-n).

%F a(n) = 2*floor(1/n)-1 = 2*A063524(n)-1. (End)

%F Dirichlet g.f.: 2 - zeta(s). - _Álvar Ibeas_, Dec 30 2018

%p A153881:=n->`if`(n=1, 1, -1); seq(A153881(n), n=1..100); # _Wesley Ivan Hurt_, Jun 20 2014

%t Table[1 - 2 Sign[n - 1], {n, 100}] (* _Wesley Ivan Hurt_, Jun 20 2014 *)

%o (Magma) [1 - 2*Sign(n-1) : n in [1..100]]; // _Wesley Ivan Hurt_, Jun 20 2014

%o (PARI) a(n)=if(n>1,-1,1) \\ _Charles R Greathouse IV_, Sep 24 2015

%Y If prefixed by initial 0, we get A134824.

%K sign,easy

%O 1,1

%A _Mats Granvik_, Jan 03 2009

%E Edited by _Charles R Greathouse IV_, Mar 18 2010

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 16:34 EDT 2024. Contains 371961 sequences. (Running on oeis4.)