OFFSET
1,2
COMMENTS
For the general case of odd numbers not divisible by a prime see a comment on A204454. There the o.g.f.s and the formulas are given.
The numerator polynomial of the o.g.f. given below has coefficients 1,2,2,2,2,2,2,2,4,2,2,2,2,2,2,2,1. See the row no. 7 of the array A204456. The first nine numbers are the first differences of the sequence if one starts with a(0):=0. The remaining ones are obtained by mirroring around the central number 4.
Compare with A192861: certain numbers from here are missing there, like 35, 49, 53, 71, 89, 97, 99, .. and others are missing here like 51, 85, 119, ...
Numbers coprime to 34. The asymptotic density of this sequence is 8/17. - Amiram Eldar, Oct 20 2020
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1).
FORMULA
O.g.f.: x*(1 + x^16 + 2*x*(1+x^8)*(Sum_{k=0..6} x^k) + 4*x^8)/((1-x^16)*(1-x)). The denominator can be factored.
a(n) = 2*n-1 + 2*floor((n+7)/16) = 2*n+1 + 2*floor((n-9)/16), n>=1. Note that for n=0 this is -1, but for the o.g.f. with start x^0 one uses a(0)=0.
a(n) = a(n-1) + a(n-16) - a(n-17). - Wesley Ivan Hurt, Oct 20 2020
MATHEMATICA
Select[Range[141], CoprimeQ[#, 34] &] (* Amiram Eldar, Oct 20 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Feb 07 2012
STATUS
approved