%I #40 Feb 22 2024 09:04:48
%S 0,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,
%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,-1,1,-1,1,-1,1,-1,1,-1,1
%N a(n) = 0^n - (-1)^n.
%C Also the numerators of the series expansion of log(1+x). Denominators are A028310. - _Robert G. Wilson v_, Aug 14 2015
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Dirichlet_eta_function">Dirichlet eta function</a>
%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (-1).
%F a(n) = A000007(n) - A033999(n) = A062160(0, n).
%F G.f.: x/(1+x).
%F Euler transform of length 2 sequence [-1, 1]. - _Michael Somos_, Jul 05 2009
%F Moebius transform is length 2 sequence [1, -2]. - _Michael Somos_, Jul 05 2009
%F a(n) is multiplicative with a(2^e) = -1 if e > 0, a(p^e) = 1 if p > 2. - _Michael Somos_, Jul 05 2009
%F Dirichlet g.f.: zeta(s) * (1 - 2^(1-s)). - _Michael Somos_, Jul 05 2009
%F Also, Dirichlet g.f.: eta(s). - _Ralf Stephan_, Mar 25 2015
%F E.g.f.: 1 - exp(-x). - _Alejandro J. Becerra Jr._, Feb 16 2021
%e G.f. = x - x^2 + x^3 - x^4 + x^5 - x^6 + x^7 - x^8 + x^9 - x^10 + ... - _Michael Somos_, Feb 20 2024
%t PadRight[{0},120,{-1,1}] (* _Harvey P. Dale_, Aug 20 2012 *)
%t Join[{0},LinearRecurrence[{-1},{1},101]] (* _Ray Chandler_, Aug 12 2015 *)
%t f[n_] := 0^n - (-1)^n; f[0] = 0; Array[f, 105, 0] (* or *)
%t CoefficientList[ Series[ x/(1 + x), {x, 0, 80}], x] (* or *)
%t Numerator@ CoefficientList[ Series[ Log[1 + x], {x, 0, 80}], x] (* _Robert G. Wilson v_, Aug 14 2015 *)
%o (PARI) {a(n) = if( n<1, 0, -(-1)^n )}; /* _Michael Somos_, Jul 05 2009 */
%o (Magma) [0^n-(-1)^n: n in [0..100]] /* or */ [0] cat &cat[ [1, -1]: n in [1..80] ];; // _Vincenzo Librandi_, Aug 15 2015
%Y Convolution inverse of A019590.
%Y Cf. A000007, A028310, A033999, A062160.
%K easy,sign,mult
%O 0,1
%A _Henry Bottomley_, Jun 08 2001