cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A204458 Odd numbers not divisible by 17.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Feb 07 2012

Keywords

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

Crossrefs

Cf. A204454 (also for more crossrefs), A204457.

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

A204454 Odd numbers not divisible by 11.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 123, 125, 127, 129, 131
Offset: 1

Views

Author

Wolfdieter Lang, Jan 24 2012

Keywords

Comments

Up to a(45) this sequence coincides with A029740, but 101 is not in A029740.
This sequence is the fourth member of the family of sequences of odd numbers not divisible by a given odd prime p. For p = 3, 5, and 7 these sequences are A007310, A045572, and A162699, respectively. The formula is
a(p;n) = 2*n+1 + 2*floor((n-(p+1)/2)/(p-1)), n>=1, p an odd prime. If one puts a(p;0):=0, the o.g.f. is
G(p;x) = (x/((1-x^(p-1))*(1-x)))*(1 + 2*sum(x^k,k=1..(p-3)/2) + 4*x^((p-1)/2) + 2*sum(x^((p-1)/2+k),k=1..(p-3)/2) + x^(p-1)).
See the array A204456 with the coefficients of the numerator polynomials of these o.g.f.s.
This sequence gives also the numbers relatively prime to 2 and 11.
Another formula is a(p;n) = 2*n-1 + 2*floor(( n-(p-3)/2)/(p-1)), n>=1. From the rows of the array A204456 for the o.g.f. one can show first: a(p;n) = n + sum(floor((n+p-3-k)/(p-1)),k=1..(p-3)/2) + 3*floor((n+(p-3)/2)/(p-1)) + sum(floor((n+(p-3)/2-k)/(p-1)),k=1..(p-1)/2), p an odd prime, n>=1. - Wolfdieter Lang, Jan 26 2012
Recurrences for odd p: a(p;n) = a(p;n-(p-1)) + 2*p. For first differences: a(p;n) = a(p;n-1) + a(p;n-p+1) - a(p;n-p), n>=p, and inputs a(p;0):=-1 (here not 0) and a(p;k) for k=1,...,p-1. See the formula sections of the A-numbers for the instances p = 3, 5, and 7 for the contributions from Zak Seidov and R. J. Mathar. From this recurrence follows the o.g.f. (starting with x^1) directly. Above it has been found from the formula for a(p;n). Here the coefficients of the numerator polynomial of the o.g.f. (besides the 1s for x^1 and x^p) arise as first differences of the input members of the {a(p;n)} sequence. - Wolfdieter Lang, Jan 27 2012
Numbers coprime to 22. The asymptotic density of this sequence is 5/11. - Amiram Eldar, Oct 20 2020

Examples

			2*floor((n-6)/10), n>=0, is the sequence (the exponent of a number indicates how many times this number appears consecutively): (-2)^6 0^10 2^10 4^10 ... By adding these numbers to 2*n+1, n>=0, one obtains -1 for n=0 and a(n) for n>=1. The o.g.f is computed from this sum, but adjusted such that one obtains a vanishing a(0).
Recurrences: 31 = a(15) = a(5) + 2*11 = 9 + 22. a(15) = a(14) + a(5) - a(4) = 29 + 9 - 7 = 31. - _Wolfdieter Lang_, Jan 27 2012
		

Crossrefs

Programs

Formula

a(n) = 2*n+1 + 2*floor((n-6)/10), n>=1. Note that this is -1 for n=0, but the following o.g.f. uses a(0)=0.
O.g.f: x*(1+2*x+2*x^2+2*x^3+2*x^4+4*x^5+2*x^6+2*x^7+2*x^8+2*x^9+x^10)/((1-x^10)*(1-x)). See the comment above for p=11.
a(n) = n + sum(floor((n+9-k)/10),k=1..4) + 3*floor((n+4)/10) + sum(floor((n+4-k)/10),k=1..5) = n + (n-1) + 2*floor((n+4)/10), n>=1. See the line m=5, p=11 of the array A204456, and the general formula given in a comment above. - Wolfdieter Lang, Jan 26 2012
Recurrences: a(n) = a(n-10) + 2*11. First differences: a(n) = a(n-1) + a(n-10) - a(n-11), n>=11, and inputs a(p;0):=-1 ( here not 0) and a(p;k) for k=1,...,10. See the general comment above. - Wolfdieter Lang, Jan 27 2012

A204457 Odd numbers not divisible by 13.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Feb 07 2012

Keywords

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

Crossrefs

Cf. A204454 and cross-references there; A204458.

Programs

  • Haskell
    a204457 n = a204457_list !! (n-1)
    a204457_list = [x | x <- [1, 3 ..], mod x 13 > 0]
    -- Reinhard Zumkeller, Feb 08 2012
    
  • 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 *)
  • PARI
    a(n) = 2*n-1+(n+5)\12*2 \\ Charles R Greathouse IV, Feb 08 2012

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.
Showing 1-3 of 3 results.