OFFSET
0
COMMENTS
Period 6: repeat [0, 1, 0, 0, 0, 1].
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65537
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
FORMULA
Fully multiplicative with a(2^e) = a(3^e) = 0, and for p > 3, a(p^e) = 1.
a(n) = 1 if gcd(n,6) == 1, otherwise 0.
For n > 1, a(n) * A065333(n) = 0.
G.f.: x*(1 + x^4)/((1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)). - Stefano Spezia, May 25 2022
Dirichlet g.f.: zeta(s)*(1-1/2^s)*(1-1/3^s). - Amiram Eldar, Dec 27 2022
MATHEMATICA
a[n_] := If[GCD[n, 6] == 1, 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Dec 27 2022 *)
PROG
(PARI) A354354(n) = ((n%2)&&(n%3));
(PARI) A354354(n) = (1==gcd(n, 6));
(PARI) A354354(n) = if(!n, 0, my(f=factor(n)); prod(k=1, #f~, (f[k, 1]>3)));
(Python)
def A354354(n): return int(not n % 6 & 3 ^ 1) # Chai Wah Wu, May 25 2022
KEYWORD
nonn,easy,mult
AUTHOR
Antti Karttunen, May 25 2022
STATUS
approved