|
|
A280560
|
|
a(n) = (-1)^n * 2 if n!=0, with a(0) = 1.
|
|
7
|
|
|
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, -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, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
Euler transform of length 2 sequence [-2, 1].
Moebius transform is length 2 sequence [-2, 4].
G.f.: (1 - x) / (1 + x) = 1 / (1 + 2*x / (1 - x)) = 1 - 2*x / (1 + x).
E.g.f.: 2*exp(-x) - 1.
a(n) = a(-n) for all n in Z.
|
|
EXAMPLE
|
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 + ...
|
|
MATHEMATICA
|
a[ n_] := (-1)^n (2 - Boole[n == 0]);
|
|
PROG
|
(PARI) {a(n) = (-1)^n * if(n, 2, 1)};
(Magma) [n eq 0 select 1 else 2*(-1)^n: n in [0..75]]; // G. C. Greubel, Jul 29 2018; Mar 28 2024
(SageMath) [2*(-1)^n -int(n==0) for n in range(76)] # G. C. Greubel, Mar 28 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|