A204458 Odd numbers not divisible by 17.
1, 3, 5, 7, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141
Offset: 1
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).
Programs
-
Mathematica
Select[Range[141], CoprimeQ[#, 34] &] (* Amiram Eldar, Oct 20 2020 *)
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
Comments