OFFSET
1,2
COMMENTS
Numbers coprime to 14. The asymptotic density of this sequence is 3/7. - Amiram Eldar, Oct 18 2020
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = 2*n + 1 + 2*floor( (2*n-7)/12 ).
a(n) = a(n-1)+a(n-6)-a(n-7). G.f.: x*(x^2+1)*(x^4+2*x^3+x^2+2*x+1)/ ((1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2). - R. J. Mathar, Jul 31 2009
MATHEMATICA
s={}; Do[If[Mod[n, 7] > 0, AppendTo[s, n]], {n, 1, 60, 2}]; s
Table[2 n + 1 + 2*Floor[(2 n - 7)/12], {n, 1, 99}]
DeleteCases[Range[1, 151, 2], _?(Divisible[#, 7]&)] (* Harvey P. Dale, Jul 04 2015 *)
PROG
(PARI) a(n)=(14*n-7)\12*2+1 \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Jul 11 2009
STATUS
approved