OFFSET
0,6
COMMENTS
Completely multiplicative with a(2) = a(3) = 0, a(p) = p otherwise. - David W. Wilson, Jun 12 2005
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
FORMULA
a(n) = -Product_{k=0..5} Sum_{j=1..n} w(6)^(kj), w(6) = e^(2*Pi*i/6), i = sqrt(-1).
G.f.: x*(x^2+1)*(x^8-x^6+6*x^4-x^2+1) / ( (x-1)^2 *(1+x)^2 *(1+x+x^2)^2 *(x^2-x+1)^2 ). - R. J. Mathar, Feb 14 2015
From Amiram Eldar, Dec 18 2023: (Start)
Dirichlet g.f.: zeta(s-1) * (1 - 1/2^(s-1)) * (1 - 1/3^(s-1)).
Sum_{k=1..n} a(k) ~ n^2/6. (End)
MATHEMATICA
Table[n Boole[Or[# == 1, # == 5] &@ Mod[n, 6]], {n, 0, 90}] (* or *)
CoefficientList[Series[x (x^2 + 1) (x^8 - x^6 + 6 x^4 - x^2 + 1)/((x - 1)^2*(1 + x)^2*(1 + x + x^2)^2*(x^2 - x + 1)^2), {x, 0, 90}], x] (* Michael De Vlieger, Jul 24 2017 *)
PROG
(PARI) a(n)=if(gcd(n, 6)==1, n, 0) \\ Charles R Greathouse IV, Jun 28 2015
(Scheme) (define (A091685 n) (if (or (even? n) (zero? (modulo n 3))) 0 n)) ;; Antti Karttunen, Jul 24 2017
(Python)
from sympy import gcd
def a(n): return n if gcd(n, 6) == 1 else 0
print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 26 2017
CROSSREFS
KEYWORD
easy,nonn,mult
AUTHOR
Paul Barry, Jan 28 2004
STATUS
approved