login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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).
a(n) = abs(A168182(n)-1).
A007953(a(n)*n) mod 9 = 0.
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
Sequence in context: A014954 A015899 A015494 * A185119 A280130 A304002
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jan 11 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 16:55 EDT 2024. Contains 372297 sequences. (Running on oeis4.)