A057427 a(n) = 1 if n > 0, a(n) = 0 if n = 0; series expansion of x/(1-x).
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, 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, 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
Offset: 0
Examples
1/90 = .0111111111111111111... G.f. = x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + ...
References
- T. M. MacRobert, Functions of a Complex Variable, 4th ed., Macmillan and Co., London, 1958, p. 90.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Index entries for characteristic functions
- Index entries for linear recurrences with constant coefficients, signature (1).
Programs
-
Haskell
a057427 = signum a057427_list = 0 : [1, 1 ..] -- Reinhard Zumkeller, Nov 28 2012
-
Maple
A057427:= signum: seq(A057427(k), k=0..50); # Wesley Ivan Hurt, Oct 22 2013
-
Mathematica
Table[Sign[n], {n, 0, 104}] (* Arkadiusz Wesolowski, Sep 16 2012 *) CoefficientList[Series[x/((1 - x)), {x, 0, 25}], x] LinearRecurrence[{1, 0}, {0, 1}, 105] Array[Sign, 105, 0] N[1/9, 111] PadRight[{0},120,1] (* Harvey P. Dale, Jan 07 2023 *)
-
PARI
{a(n) = sign(n)};
-
PARI
/* n>=0 */ a(n)=!!n \\ Jaume Oliver Lafont, Mar 19 2009
-
Python
def A057427(n): return int(n!=0) # Chai Wah Wu, Nov 14 2022
Formula
G.f.: x / (1 - x).
G.f.: Sum_{k>=0} 2^k * x^(2^k) / (1 + x^(2^k)). - Michael Somos, Sep 11 2005
a(n) = A000007(0^n). - Jaume Oliver Lafont, Mar 19 2009
From Michael Somos, Aug 17 2015: (Start)
a(n) = -a(-n) for all n in Z if a(n) is treated as sgn(n).
Sum_{k<0} a(k) * x^k = 1 / (1 - x) if abs(x) > 1. (End)
Dirichlet g.f.: zeta(s) - 1. - Álvar Ibeas, Nov 29 2015; corrected by Francois Oger, Oct 26 2019
E.g.f.: e^x - 1. - Francois Oger, Oct 26 2019
a(n) = 1-A000007(n). - Chai Wah Wu, Nov 14 2022
Extensions
Entry edited at the suggestion of Robert G. Wilson v by N. J. A. Sloane, Aug 16 2015
Comments