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
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,1,-1).
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
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Feb 07 2012
STATUS
approved