login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Odd numbers not divisible by 13.
4

%I #30 Oct 20 2020 21:31:29

%S 1,3,5,7,9,11,15,17,19,21,23,25,27,29,31,33,35,37,41,43,45,47,49,51,

%T 53,55,57,59,61,63,67,69,71,73,75,77,79,81,83,85,87,89,93,95,97,99,

%U 101,103,105,107,109

%N Odd numbers not divisible by 13.

%C 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.

%C 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.

%C Numbers coprime to 26. The asymptotic density of this sequence is 6/13. - _Amiram Eldar_, Oct 20 2020

%H Reinhard Zumkeller, <a href="/A204457/b204457.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Rec#order_13">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,0,0,1,-1).

%F 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.

%F 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.

%t 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 *)

%o (Haskell)

%o a204457 n = a204457_list !! (n-1)

%o a204457_list = [x | x <- [1, 3 ..], mod x 13 > 0]

%o -- _Reinhard Zumkeller_, Feb 08 2012

%o (PARI) a(n) = 2*n-1+(n+5)\12*2 \\ _Charles R Greathouse IV_, Feb 08 2012

%Y Cf. A204454 and cross-references there; A204458.

%K nonn,easy

%O 1,2

%A _Wolfdieter Lang_, Feb 07 2012