|
|
A267142
|
|
The characteristic function of the multiples of 9.
|
|
3
|
|
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
G.f.: 1/(1 - x^9) = -1 / ( (x-1)*(1+x+x^2)*(x^6+x^3+1) ).
a(n) = abs(sign(n mod 9) - 1).
|
|
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
|
(PARI) a(n) = n\9 - (n-1)\9; \\ Altug Alkan, Jan 11 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|