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-10 of 22 results. Next

A145532 Number of numbers removed in each step of Eratosthenes's sieve for 5!.

Original entry on oeis.org

59, 19, 7, 4
Offset: 1

Views

Author

Artur Jasinski, Oct 12 2008

Keywords

Comments

The number of steps in Eratosthenes's sieve for n! is A133228(n).
The number of primes less than 5! is 120 - 59 - 19 - 7 - 4 - 1 = 30 = A003604(5).

Examples

			a(1)=59 because in first step we removed all numbers divisible by 2 (=60) with the exception of the first one, i.e., 2.
a(2)=19 because the number of numbers divisible by 3 and not divisible by 2 is 20 and we remove all with the exception of the first one, i.e., 3.
		

Crossrefs

A145583 a(n) = number of numbers removed in the n-th step of Eratosthenes's sieve for 10^2.

Original entry on oeis.org

49, 16, 6, 3
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for 10^n is A122121(n).
Number of primes less than 10^2 is equal to 10^2 - (sum all of numbers in this sequence) - 1 = A006880(2).

Crossrefs

Programs

  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 2; kk = PrimePi[Sqrt[10^nn]]; t3 = f3[10^nn, kk] (*Bob Hanlon (hanlonr(AT)cox.net) *)

A145592 a(n)=number of numbers removed in each step of Eratosthenes's sieve for 2^14.

Original entry on oeis.org

8191, 2730, 1091, 623, 340, 260, 182, 154, 121, 94, 89, 74, 66, 62, 55, 48, 43, 39, 35, 31, 28, 25, 23, 19, 15, 12, 11, 9, 7, 5, 1
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for 2^n is A060967(n).
Number of primes less than 2^14 is equal to 2^14 - (sum all of numbers in this sequence) - 1 = A007053(14).

Crossrefs

Programs

  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 14; kk = PrimePi[Sqrt[2^nn]]; t3 = f3[2^nn, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

A145537 a(n) is the number of numbers removed in each step of Eratosthenes's sieve for 10!.

Original entry on oeis.org

1814399, 604799, 241919, 138239, 75402, 58003, 40941, 34478, 26982, 20473, 18496, 15008, 13184, 12266, 10957, 9492, 8342, 7920, 7057, 6538, 6248, 5667, 5317, 4874, 4414, 4181, 4057, 3866, 3752, 3582, 3166, 3054, 2911, 2856, 2675, 2640, 2544, 2455, 2399
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for n! is A133228(n).
Number of primes less than 10! is 10! - (sum all numbers in this sequence) - 1 = A003604(10).

Crossrefs

Programs

  • Maple
    A145537:=Array([seq(0,j=1..291)]): lim:=10!: p:=Array([seq(ithprime(j),j=1..291)]): for n from 4 to lim do if(isprime(n))then n:=n+1: fi: for k from 1 to 291 do if(n mod p[k] = 0)then A145537[k]:=A145537[k]+1: break: fi: od: od: seq(A145537[j],j=1..291); # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 10; kk = PrimePi[Sqrt[nn! ]]; t3 = f3[nn!, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

A145538 Number of numbers removed in each step of Eratosthenes's sieve for 10^5.

Original entry on oeis.org

49999, 16666, 6666, 3808, 2077, 1597, 1127, 949, 741, 555, 499, 405, 358, 335, 305, 274, 248, 242, 219, 203, 199, 184, 175, 165, 148, 141, 137, 131, 128, 124, 108, 104, 97, 95, 87, 86, 79, 75, 70, 67, 62, 60, 57, 54, 52, 50, 45, 39, 37, 35, 32, 29, 28, 25, 23, 20
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for 10^n is A122121(n).
Number of primes less than 10^5 equals 10^5 - A065894(5) (sum of all numbers in this sequence) - 1 = A006880(5).
a(n) is the number of composite numbers m <= 10^5 whose least prime factor (A020639(m)) is prime(n).

Crossrefs

Programs

  • Maple
    A145538:=Array([seq(0,j=1..65)]): lim:=10^5: p:=Array([seq(ithprime(j),j=1..65)]): for n from 4 to lim do if(isprime(n))then n:=n+1: fi: for k from 1 to 65 do if(n mod p[k] = 0)then A145538[k]:=A145538[k]+1: break: fi: od: od: seq(A145538[j],j=1..65); # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 5; kk = PrimePi[Sqrt[10^nn]]; t3 = f3[10^nn, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

Extensions

Edited by Rick L. Shepherd, Mar 02 2013

A145533 a(n) is the number of numbers removed in each step of Eratosthenes's sieve for 6!.

Original entry on oeis.org

359, 119, 47, 26, 14, 11, 7, 5, 3
Offset: 1

Views

Author

Artur Jasinski, Oct 12 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for n! is A133228(n).
Number of primes less than 6! is 720 - 359 - 119 - 47 - 26 - 14 - 11 - 7 - 5 - 3 - 1 = 128 = A003604(6).

Examples

			a(1)=359 because in the first step we remove all numbers divisible by 2 (= 360) with the exception of the first one, i.e., 2.
a(2)=119 because the number of numbers divisible by 3 and not divisible by 2 is 120 and we remove all such numbers with the exception of the first one, 3.
		

Crossrefs

Programs

  • Maple
    A145533 := {$(1..6!)}: for n from 1 do p:=ithprime(n): r:=0: lim:=6!/p: for k from 2 to lim do if(member(k*p,A145533))then r:=r+1: fi: A145533 := A145533 minus {k*p}: od: printf("%d, ", r): if(r=0)then break: fi: od: # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    {m1, m2, m3, m4, m5, m6, m7, m8, m9} = {-1, -1, -1, -1, -1, -1, -1, -1, -1};
    Do[If[Mod[n, 2] == 0, m1 = m1 + 1,
    If[Mod[n, 3] == 0, m2 = m2 + 1,
    If[Mod[n, 5] == 0, m3 = m3 + 1,
    If[Mod[n, 7] == 0, m4 = m4 + 1,
    If[Mod[n, 11] == 0, m5 = m5 + 1,
    If[Mod[n, 13] == 0, m6 = m6 + 1,
    If[Mod[n, 17] == 0, m7 = m7 + 1,
    If[Mod[n, 19] == 0, m8 = m8 + 1,
    If[Mod[n, 23] == 0, m9 = m9 + 1]]]]]]]]], {n, 1, 6!}];
    Print[{m1, m2, m3, m4, m5, m6, m7, m8, m9}] (* Artur Jasinski *)

A145534 a(n) is the number of numbers removed in each step of Eratosthenes's sieve for 7!.

Original entry on oeis.org

2519, 839, 335, 191, 104, 79, 57, 49, 39, 31, 27, 21, 18, 17, 14, 9, 7, 5, 3
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for n! is A133228(n).
Number of primes less than 7! is 7! - (sum all numbers in this sequence) - 1 = A003604(7).

Crossrefs

Programs

  • Maple
    A145534 := {$(1..7!)}: for n from 1 do p:=ithprime(n): r:=0: lim:=7!/p: for k from 2 to lim do if(member(k*p,A145534))then r:=r+1: fi: A145534 := A145534 minus {k*p}: od: printf("%d, ", r): if(r=0)then break: fi: od: # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 7; kk = PrimePi[Sqrt[nn! ]]; t3 = f3[nn!, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

A145535 a(n) is the number of numbers removed in each step of Eratosthenes's sieve for 8!.

Original entry on oeis.org

20159, 6719, 2687, 1535, 836, 642, 454, 381, 297, 223, 204, 170, 154, 146, 134, 119, 108, 103, 92, 84, 81, 76, 70, 64, 56, 53, 51, 47, 45, 42, 36, 32, 30, 28, 23, 21, 18, 16, 15, 12, 8, 6, 5, 3, 2, 1
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for n! is A133228(n).
Number of primes less than 8! is 8! - (sum all numbers in this sequence) - 1 = A003604(8).

Crossrefs

Programs

  • Maple
    A145535 := {$(1..8!)}: for n from 1 do p:=ithprime(n): r:=0: lim:=8!/p: for k from 2 to lim do if(member(k*p,A145535))then r:=r+1: fi: A145535 := A145535 minus {k*p}: od: printf("%d, ", r): if(r=0)then break: fi: od: # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 8; kk = PrimePi[Sqrt[nn! ]]; t3 = f3[nn!, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

A145536 a(n) is the number of numbers removed in each step of Eratosthenes's sieve for 9!.

Original entry on oeis.org

181439, 60479, 24191, 13823, 7540, 5800, 4092, 3446, 2701, 2046, 1842, 1487, 1296, 1200, 1070, 927, 817, 782, 703, 665, 645, 600, 574, 538, 498, 477, 465, 451, 441, 425, 385, 372, 351, 346, 326, 322, 308, 294, 288, 277, 267, 263, 248, 246, 238, 236, 221, 211
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for n! is A133228(n).
Number of primes less than 9! is 9! - (sum all numbers in this sequence) - 1 = A003604(9).

Crossrefs

Programs

  • Maple
    A145536:=Array([seq(0,j=1..110)]): lim:=9!: p:=Array([seq(ithprime(j),j=1..110)]): for n from 4 to lim do if(isprime(n))then n:=n+1: fi: for k from 1 to 110 do if(n mod p[k] = 0)then A145536[k]:=A145536[k]+1: break: fi: od: od: seq(A145536[j],j=1..110); # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 9; kk = PrimePi[Sqrt[nn! ]]; t3 = f3[nn!, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

A145539 Number of numbers removed in each step of Eratosthenes's sieve for 10^6.

Original entry on oeis.org

499999, 166666, 66666, 38094, 20778, 15983, 11283, 9502, 7434, 5646, 5098, 4136, 3617, 3356, 2982, 2575, 2261, 2143, 1910, 1775, 1700, 1553, 1460, 1354, 1244, 1195, 1171, 1130, 1109, 1074, 964, 937, 898, 886, 832, 820, 794, 763, 745, 719, 697, 689, 654
Offset: 1

Views

Author

Artur Jasinski with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008

Keywords

Comments

Number of steps in Eratosthenes's sieve for 10^n is A122121(n).
Number of primes less than 10^6 equals 10^6 - A065894(6) (sum of all numbers in this sequence) - 1 = A006880(6).
a(n) is the number of composite numbers m <= 10^6 whose least prime factor (A020639(m)) is prime(n). - Rick L. Shepherd, Mar 02 2013

Crossrefs

Programs

  • Maple
    A145539:=Array([seq(0,j=1..168)]): lim:=10^6: p:=Array([seq(ithprime(j),j=1..168)]): for n from 4 to lim do if(isprime(n))then n:=n+1: fi: for k from 1 to 168 do if(n mod p[k] = 0)then A145539[k]:=A145539[k]+1: break: fi: od: od: seq(A145539[j],j=1..168); # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    f3[k_Integer?Positive, i_Integer?Positive] := Module[{f, m, r, p}, p = Transpose[{r = Range[2, i], Prime[r]}];f[x_] := Catch[Fold[If[Mod[x, #2[[2]]] == 0, Throw[m[ #2[[1]]] = m[ #2[[1]]] + 1], #1] &, If[Mod[x, 2] == 0, Throw[m[1] = m[1] + 1]], p]]; Table[m[n] = -1, {n, i}]; f /@ Range[k]; Table[m[n], {n, i}]];nn = 6; kk = PrimePi[Sqrt[10^nn]]; t3 = f3[10^nn, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)
Showing 1-10 of 22 results. Next