OFFSET
0
COMMENTS
Decimal expansion of 100000000/999999999.
Period 9: repeat [1, 0, 0, 0, 0, 0, 0, 0, 0].
More generally, the ordinary generating function for the characteristic function of the multiples of k is 1/(1 - x^k).
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..999
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
FORMULA
MATHEMATICA
Table[Boole[Divisible[n, 9]], {n, 0, 115}]
Table[Abs[Sign[Mod[n, 9]] - 1], {n, 0, 115}]
CoefficientList[Series[1 / (1 - x^9), {x, 0, 100}], x] (* Vincenzo Librandi, Jan 11 2016 *)
PROG
(Magma) &cat[&cat[[1], [0]^^8]^^14]; // Vincenzo Librandi, Jan 11 2016
(PARI) a(n) = n\9 - (n-1)\9; \\ Altug Alkan, Jan 11 2016
(PARI) A267142(n) = !(n%9); \\ Antti Karttunen, Oct 07 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jan 11 2016
STATUS
approved