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-4 of 4 results.

A118501 A variation on Flavius's sieves (A099204, A099243): Start with the Chen numbers; at the k-th sieving step, remove every p-th term of the sequence remaining after the (k-1)-st sieving step, where p is the k-th prime; iterate.

Original entry on oeis.org

2, 5, 17, 23, 53, 83, 127, 167, 181, 211, 281, 347, 449, 467, 499, 509, 641, 677, 821, 887, 941, 953, 1097, 1193, 1283, 1327, 1399, 1471, 1583, 1721, 1949, 2029, 2111, 2213, 2351, 2381, 2447, 2549, 2609, 2777, 3061, 3137, 3257, 3307, 3511, 3539, 3797
Offset: 1

Views

Author

Jani Melik, May 05 2006

Keywords

Examples

			Start with
2 3 5 7 11 13 17 19 23 29 31 37 41 47 53 59 67 71 83 89 101 107 109 113 127 131 ... and delete every second term, giving
2 5 11 17 23 31 41 53 67 83 101 109 127 ... and delete every 3rd term, giving
2 5 17 23 41 53 83 101 127 ... and delete every 5th term, giving
2 5 17 23 53 83 101 127
.... Continue forever and what's left is the sequence.
		

Crossrefs

Programs

A099204 A variation on Flavius's sieve (A000960): Start with the natural numbers; at the k-th sieving step, remove every p-th term of the sequence remaining after the (k-1)-st sieving step, where p is the k-th prime; iterate.

Original entry on oeis.org

1, 3, 7, 9, 15, 19, 25, 31, 33, 37, 45, 51, 61, 63, 67, 69, 81, 85, 97, 105, 109, 111, 123, 129, 135, 141, 145, 151, 159, 169, 183, 189, 195, 201, 211, 213, 219, 225, 229, 241, 261, 265, 273, 277, 289, 291, 307, 315, 319, 321, 325, 339, 351, 355, 361, 375, 381
Offset: 1

Views

Author

N. J. A. Sloane, Nov 16 2004

Keywords

Examples

			Start with
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... and delete every second term, giving
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 ... and delete every 3rd term, giving
1 3 7 9 13 15 19 21 25 27 ... and delete every 5th term, giving
1 3 7 9 15 19 21 25 ... and delete every 7th term, giving
.... Continue forever and what's left is the sequence.
		

Crossrefs

Programs

  • Maple
    S[1]:={seq(i,i=1..390)}: for n from 2 to 390 do S[n]:=S[n-1] minus {seq(S[n-1][ithprime(n-1)*i],i=1..nops(S[n-1])/ithprime(n-1))} od: S[390]; # Emeric Deutsch, Nov 17 2004
  • Mathematica
    Clear[l,ps];ps=Prime[Range[100]];l=Range[400];Do[l=Drop[l,{First[ps],-1, First[ps]}];ps=Rest[ps],{17}];l (* Harvey P. Dale, Sep 03 2011 *)
  • Python
    import sympy
    from sympy import prime
    def a(n):
      x = 1
      lst = []
      lst.extend(range(1, 1000))
      while x <= n:
        lst1 = []
        for i in lst:
          if (lst.index(i)+1)%prime(x)!=0:
            lst1.append(i)
        lst.clear()
        lst.extend(lst1)
        x += 1
      return lst1[n-1]
    n = 1
    while n < 100:
      print(a(n), end=', ')
      n += 1
    # Derek Orr, Jun 16 2014

Extensions

More terms from Ray Chandler, Nov 16 2004

A099361 A variation on the sieve of Eratosthenes (A000040): Start with the primes; the first term is 2, which is a(1) and we cross off every second prime starting with 2; the next prime not crossed off is 3, which is a(2) and we cross off every third prime starting with 3; the next prime not crossed off is 7, which is a(3) and we cross off every 7th prime starting with 7; and so on.

Original entry on oeis.org

2, 3, 7, 13, 29, 37, 53, 79, 89, 107, 113, 139, 151, 173, 181, 223, 239, 251, 311, 317, 349, 359, 383, 397, 421, 463, 491, 503, 541, 577, 593, 613, 619, 647, 659, 683, 743, 787, 821, 857, 863, 887, 911, 983, 997, 1033, 1061, 1151, 1163, 1193, 1213, 1249
Offset: 1

Views

Author

N. J. A. Sloane, Nov 18 2004

Keywords

Comments

In contrast to Flavius's sieve (A000960), primes are not erased when they are crossed off; that is, primes get crossed off multiple times (see A099362).

Examples

			The first few sieving stages are as follows (X or XX indicates a prime that has been crossed off one or more times):
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ...
2 3 X 7 XX 13 XX 19 XX 29 XX 37 XX 43 XX 53 XX 61 XX 71 XX 79 XX 89 XX ...
2 3 X 7 XX 13 XX XX XX 29 XX 37 XX XX XX 53 XX 61 XX XX XX 79 XX 89 XX ...
2 3 X 7 XX 13 XX XX XX 29 XX 37 XX XX XX 53 XX XX XX XX XX 79 XX 89 XX ...
.... Continue forever and the numbers not crossed off give the sequence.
		

Crossrefs

Programs

  • Mathematica
    nn=300; a=Prime[Range[nn]]; Do[p=a[[i]]; If[p>0, Do[a[[j]]=0, {j, i+p, nn, p}]], {i, nn}]; Rest[Union[a]] (* T. D. Noe, Nov 18 2004 *)

Extensions

More terms from T. D. Noe and Ray Chandler, Nov 18 2004

A099207 A variation on Flavius's sieve (A000960): Start with the primes; at the k-th sieving step, remove every (k+1)-st term of the sequence remaining after the (k-1)-st sieving step; iterate.

Original entry on oeis.org

2, 5, 17, 41, 67, 103, 167, 227, 307, 401, 467, 599, 751, 853, 1087, 1279, 1409, 1607, 1879, 2027, 2351, 2671, 2731, 3253, 3433, 3803, 4127, 4517, 4817, 5381, 5813, 6203, 6521, 7247, 7489, 8011, 8761, 8933, 9629, 10273, 10861, 11243, 12301, 12421, 13297
Offset: 1

Views

Author

N. J. A. Sloane, Nov 16 2004

Keywords

Examples

			Start with
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 ... and delete every second term, giving
2 5 11 17 23 31 41 47 59 67 73 83 97 103 ... and delete every 3rd term, giving
2 5 17 23 41 47 67 73 97 103 ... and delete every 4th term, giving
.... Continue forever and what's left is the sequence.
		

Crossrefs

Programs

  • Maple
    S[1]:={seq(ithprime(i),i=1..2500)}: for n from 2 to 2500 do S[n]:=S[n-1] minus {seq(S[n-1][n*i],i=1..nops(S[n-1])/n)} od: A:=S[2500]; # Emeric Deutsch, Nov 15 2004

Extensions

More terms from Ray Chandler and Emeric Deutsch, Nov 16 2004
Showing 1-4 of 4 results.