login
A204457
Odd numbers not divisible by 13.
4
1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 93, 95, 97, 99, 101, 103, 105, 107, 109
OFFSET
1,2
COMMENTS
For the general case of odd numbers not divisible by primes see a comment on A204454, where the o.g.f.s and the formulas in terms of floor functions are given.
The numerator polynomial of the o.g.f. given in the formula section has coefficients 1,2,2,2,2,2,4,2,2,2,2,2,1, see row no. 6 of A204456. The first seven numbers are the first differences of the sequence, starting with a(0)=0. The other numbers are obtained by mirroring around the center.
Numbers coprime to 26. The asymptotic density of this sequence is 6/13. - Amiram Eldar, Oct 20 2020
LINKS
FORMULA
O.g.f.: x*(1 + 2*(x+x^6)*(1+x+x^2+x^3+x^4) + 4*x^6 + x^12)/((1-x^12)*(1-x)). The denominator can be factored.
a(n) = 2*n-1 + 2*floor((n+5)/12) = 2*n+1 + 2*floor((n-7)/12), n>=1. Note that this is -1 for n=0, but the o.g.f. starting with x^0 has a(0)=0.
MATHEMATICA
Select[Range[1, 111, 2], !Divisible[#, 13]&] (* or *) With[{nn=111}, Complement[ Range[1, nn, 2], 13*Range[Floor[nn/13]]]] (* Harvey P. Dale, Jul 23 2013 *)
PROG
(Haskell)
a204457 n = a204457_list !! (n-1)
a204457_list = [x | x <- [1, 3 ..], mod x 13 > 0]
-- Reinhard Zumkeller, Feb 08 2012
(PARI) a(n) = 2*n-1+(n+5)\12*2 \\ Charles R Greathouse IV, Feb 08 2012
CROSSREFS
Cf. A204454 and cross-references there; A204458.
Sequence in context: A165704 A275852 A300914 * A283800 A043325 A023692
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Feb 07 2012
STATUS
approved