OFFSET
1,2
COMMENTS
These are the positive integers not divisible by 2, 3, or 7.
Numbers coprime to 42. The asymptotic density of this sequence is 2/7. - Amiram Eldar, Oct 23 2020
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,1,-1).
FORMULA
a(n) = a(n-12) + 42, n>=13.
a(n) = a(n-1) + a(n-12) - a(n-13), n>=13, with a(0)=-1.
a(n) = 2*n-1 + 2*sum(F21[j]*floor((n+(j-1))/12),j=1..12), with F21=[1,2,0,1,0,1,0,1,0,2,1,0], n>=1. For n=0 this becomes -1, but the following o.g.f. has a(0)=0 if it starts with x^0.
O.g.f.: x*(1+x^12+4*x*(1+x^10)+6*x^2*(1+x^8)+2*x^3*(1+x^6)+4*x^4*(1+x^4)+2*x^5*(1+x^2)+4*x^6)/((1-x^12)*(1-x)). The denominator could be factored into cyclotomic polynomials. Compare with the formula contribution from R. J. Mathar in A007775.
MATHEMATICA
Select[Range[1, 211, 2], CoprimeQ[#, 21]&] (* Harvey P. Dale, Jul 28 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Feb 10 2012
STATUS
approved