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-6 of 6 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

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

A099243 A variation on Flavius's sieve (A000960): Start with the primes; 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, 47, 67, 97, 127, 137, 157, 197, 233, 283, 307, 331, 347, 419, 439, 509, 571, 599, 607, 677, 727, 761, 811, 829, 877, 937, 1009, 1093, 1129, 1187, 1229, 1297, 1303, 1367, 1427, 1447, 1523, 1663, 1697, 1753, 1787, 1879, 1901, 2027, 2087, 2113, 2131
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 5th term, giving
.... Continue forever and what's left is the sequence.
		

Crossrefs

Programs

  • Maple
    S[1]:={seq(ithprime(i),i=1..322)}: for n from 2 to 322 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[322]; # Emeric Deutsch, Nov 17 2004
  • Mathematica
    alle[0]=Table[Prime[i], {i, 1, 10000}]; alle[i_]:=alle[i]= Module[{zuloeschen= Table[alle[i-1][[j]], {j, Prime[i], Length[alle[i-1]], Prime[i]}]}, Complement[alle[i-1], zuloeschen]] (* alle[i] gives the sequence after the i-th iteration and here the first Prime[i] elements are fixed and will not chang in later iterations. So to get the first Prime[10]=29 terms, type *) Take[alle[10], Prime[10]] (* Michael Taktikos, Nov 16 2004 *)

Extensions

More terms from Michael Taktikos and Ray Chandler, Nov 16 2004

A247105 Variation of Flavius Josephus's sieve: Start with the natural numbers; at the k-th sieving step, make k passes removing every k-th term of the sequence remaining after the previous sieving step; iterate.

Original entry on oeis.org

1, 5, 25, 109, 385, 1373, 4645, 16009, 48817, 159757, 488377, 1571425, 4560901, 14482393, 43408013, 130394125, 380755429, 1118740741, 3326930413, 9931863461, 28466058257, 84243573797, 240453967777, 706827067045, 2009065808473, 5913933615149, 16711898903281
Offset: 1

Views

Author

Sergio Pimentel, Nov 18 2014

Keywords

Comments

Starting with the natural numbers, make 2 passes removing every 2nd number, 3 passes removing every 3rd number, etc.
Is the limiting value of a(n+1)/a(n)=3?
Since 1/(1-1/n)^n converges to e (as n -> inf), a(n+1)/a(n) converges to e. - Hiroaki Yamanouchi, Nov 27 2014

Examples

			The 1st pass removes 2, 4, 6, 8, 10, etc. The 2nd pass (also with 2) removes 3, 7, 11, 15, 19, etc. Then there are 3 passes removing every 3rd number, of which the 1st pass removes 9, 21, 33, 45, ..., the 2nd removes 13, 29, 49, ..., and the 3rd removes 17, 41, 73, ...; then there are 4 passes with 4; 5 passes with 5; etc.
		

Crossrefs

Programs

  • Mathematica
    A247105 = Reap[Quiet @ For[n=1, n<28, n++, m = n; For[i=n, i >= 1, i--, For[j=1, j <= i, j++, t = Floor[(m*i)/(i-1)]; While[t - Floor[t/i] >= m, t -= 1];  om = m; m = t+1]]; Sow[om]]][[2, 1]] (* Jean-François Alcover, Nov 28 2014, translated and adapted from Hiroaki Yamanouchi's Python script *)
  • PARI
    copydropmult(v,m)=vector(#v-#v\m,i,v[(i-1)*m\(m-1)+1])
    alim(n)=my(r=vector(n,i,i),j=2,k=1);while(j<#r,r=copydropmult(r,j);if(k++>j,j++;k=1));r
    
  • Python
    for n in range(1, 101):
      m = n
      for i in range(n, 1, -1):
        for j in range(i):
          t = m * i // (i - 1)
          while t - t // i >= m:
            t -= 1
          m = t + 1
      print(f"{n} {m}") # Hiroaki Yamanouchi, Nov 28 2014

Extensions

More values from Franklin T. Adams-Watters, Nov 21 2014
a(12)-a(20) from Alois P. Heinz, Nov 26 2014
a(21)-a(27) from Hiroaki Yamanouchi, Nov 27 2014

A104177 A variation on Flavius's sieve (A000960): Start with the natural numbers; at the k-th sieving step, remove every f-th term of the sequence remaining after the (k-1)-st sieving step, where f is the (k+2)-nd Fibonacci number, f=F(k+2); iterate.

Original entry on oeis.org

1, 3, 7, 9, 15, 19, 21, 31, 33, 37, 39, 45, 51, 61, 63, 67, 69, 75, 79, 81, 93, 97, 99, 109, 111, 121, 123, 127, 129, 135, 139, 141, 151, 157, 165, 169, 171, 181, 183, 189, 195, 199, 201, 211, 213, 219, 225, 229, 231, 241, 243, 247, 249, 255, 261, 271, 277, 279
Offset: 1

Views

Author

Tyler D. Rick (tyler.rick(AT)does.not.want.spam.com), Mar 11 2005

Keywords

Comments

This sequence is approximately as dense as the lucky numbers or primes: there are 195 of these numbers, 153 lucky numbers and 168 primes less than 1000.

Examples

			Start with
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... (A000027)
First sieving step: Delete every 2nd term (2=F(1+2)), giving
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 ... (A005408)
2nd sieving step: Delete every 3rd term (3=F(2+2)), giving
1 3 7 9 13 15 19 21 25 27 31 ... (A056530)
3rd sieving step: Delete every 5th (5=F(3+2)) term, giving
1 3 7 9 15 19 21 25 31 ...
4th sieving step: Delete every 8th (8=F(4+2)) term, giving
1 3 7 9 15 19 21 31 ...
Continue forever and whatever remains is the sequence.
		

Crossrefs

Showing 1-6 of 6 results.