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!)
A280560 a(n) = (-1)^n * 2 if n!=0, with a(0) = 1. 7

%I #23 Mar 28 2024 09:04:06

%S 1,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,

%T -2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,

%U 2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2

%N a(n) = (-1)^n * 2 if n!=0, with a(0) = 1.

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

%F Euler transform of length 2 sequence [-2, 1].

%F Moebius transform is length 2 sequence [-2, 4].

%F a(n) = -2*A033999(n) if n!=0.

%F G.f.: (1 - x) / (1 + x) = 1 / (1 + 2*x / (1 - x)) = 1 - 2*x / (1 + x).

%F E.g.f.: 2*exp(-x) - 1.

%F a(n) = a(-n) for all n in Z.

%F a(n) = A084100(2*n) = A084100(2*n + 1), if n>=0.

%F a(n) = (-1)^n * A040000(n).

%F a(2*n) = A040000(n).

%F Convolution inverse is A040000.

%e G.f. = 1 - 2*x + 2*x^2 - 2*x^3 + 2*x^4 - 2*x^5 + 2*x^6 - 2*x^7 + 2*x^8 - 2*x^9 + ...

%t a[ n_] := (-1)^n (2 - Boole[n == 0]);

%t PadRight[{1},120,{2,-2}] (* _Harvey P. Dale_, Jun 04 2019 *)

%o (PARI) {a(n) = (-1)^n * if(n, 2, 1)};

%o (Magma) [n eq 0 select 1 else 2*(-1)^n: n in [0..75]]; // _G. C. Greubel_, Jul 29 2018; Mar 28 2024

%o (SageMath) [2*(-1)^n -int(n==0) for n in range(76)] # _G. C. Greubel_, Mar 28 2024

%Y Cf. A033999, A040000, A084100.

%K sign,easy

%O 0,2

%A _Michael Somos_, Jan 05 2017

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)