login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A209198
a(n) = 1 if n not == 2 (mod 4) and relatively prime to 63 otherwise 0.
2
1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0
OFFSET
1,1
LINKS
FORMULA
G.f.: B(x) - B(x^7) - B(x^9) + B(x^63) where B(x) = (x + x^3 + x^4) / (1 - x^4).
a(n) is multiplicative with a(2^e) = 1 if e!=1, a(3^e) = 1 if e<2, a(7^e) = 0^e, a(p^e) = 1 otherwise.
a(n) = a(n + 252) = a(-n), a(4*n + 2) = a(7*n) = a(9*n) = 0 for all n in Z.
Euler transform is A119952.
From Amiram Eldar, Oct 24 2023: (Start)
Dirichlet g.f.: zeta(s) * (1 - 1/2^s + 1/4^s) * (1 - 1/9^s) * (1 - 1/7^s).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4/7. (End)
EXAMPLE
G.f. = x + x^3 + x^4 + x^5 + x^8 + x^11 + x^12 + x^13 + x^15 + x^16 + x^17 + ...
MATHEMATICA
B[x_]:= (x + x^3 + x^4)/(1 - x^4); CoefficientList[Series[B[x] - B[x^7] - B[x^9] + B[x^63], {x, 0, 50}], x] (* G. C. Greubel, Aug 11 2018 *)
PROG
(PARI) {a(n) = my(A, p, e); n = abs(n); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, e>1, p==3, e<2, p==7, 0, 1)))};
(PARI) {a(n) = b(n) - b(n/7) - b(n/9) + b(n/63)}; {b(n) = if( n == round(n), n%4 != 2, 0)};
(PARI) {a(n) = n%4!=2 && n%7!=0 && n%9!=0};
CROSSREFS
Cf. A119952.
Sequence in context: A230298 A000480 A118251 * A282343 A099076 A282339
KEYWORD
nonn,easy,mult
AUTHOR
Michael Somos, Mar 05 2012
STATUS
approved