OFFSET
1
COMMENTS
a(n) = 1 if n is either non-multiple of 3 or n is a multiple 9, and 0 otherwise (if the 3-adic valuation of n is 1).
Period 9: repeat [1, 1, 0, 1, 1, 0, 1, 1, 1].
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
FORMULA
Multiplicative with a(3^e) = 1 if e>1, and 0 if e=1, and for all other primes p, a(p^e) = 1.
a(n) = [A007949(n) != 1], where [ ] is the Iverson bracket.
From Amiram Eldar, Jun 28 2024: (Start)
Dirichlet g.f.: zeta(s) * (1 - 1/3^s + 1/9^s).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 7/9. (End)
MATHEMATICA
a[n_] := If[IntegerExponent[n, 3] == 1, 0, 1]; Array[a, 100] (* Amiram Eldar, Jun 28 2024 *)
PROG
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Antti Karttunen, Jun 28 2024
STATUS
approved