A168182 Characteristic function of numbers that are not multiples of 9.
0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
Offset: 0
Examples
G.f. = x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^10 + x^11 + x^12 + x^13 + ...
Links
- Antti Karttunen, Table of n, a(n) for n = 0..999
- Michael Somos, Rational Function Multiplicative Coefficients
- Index entries for characteristic functions
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
Crossrefs
Programs
-
Mathematica
A168182[n_]:=Boole[!Divisible[n,9]]; Array[A168182, 10, 0] Table[If[Mod[n,9]==0,0,1],{n,0,120}] (* Harvey P. Dale, Mar 05 2025 *)
-
PARI
{a(n) = sign(n%9)}; /* Michael Somos, Mar 22 2011 */
Formula
Euler transform of length 9 sequence [1, 0, 0, 0, 0, 0, 0, -1, 1]. - Michael Somos, Mar 22 2011
Moebius transform is length 9 sequence [1, 0, 0, 0, 0, 0, 0, 0, -1]. - Michael Somos, Mar 22 2011
Expansion of x * (1 - x^8) / ((1 - x) * (1 - x^9)) in powers of x. - Michael Somos, Mar 22 2011
Multiplicative with a(p^e) = (if p=3 then 0^(e-1) else 1), p prime and e>0.
a(n) = a(n+9) = a(-n) for all n in Z.
A033441(n) = Sum_{k=0..n} a(k)*(n-k).
G.f.: -x*(1+x)*(1+x^2)*(1+x^4) / ( (x-1)*(1+x+x^2)*(x^6+x^3+1) ). - R. J. Mathar, Jan 07 2011
Dirichlet g.f. (1-3^(-2s))*zeta(s). - R. J. Mathar, Mar 06 2011
For the general case: the characteristic function of numbers that are not multiples of m is a(n)=floor((n-1)/m)-floor(n/m)+1, m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = 1 - A267142(n). - Antti Karttunen, Oct 07 2017