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 10 results.

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

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

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

A227155 Number of composites removed in each step of the Sieve of Eratosthenes for 10^7.

Original entry on oeis.org

4999999, 1666666, 666666, 380952, 207791, 159839, 112829, 95016, 74356, 56405, 50949, 41317, 36293, 33780, 30205, 26228, 23123, 21975, 19655, 18249, 17467, 15871, 14876, 13668, 12358, 11710, 11344, 10779, 10451, 9955, 8748, 8398, 7956, 7768, 7181, 7034, 6724
Offset: 1

Views

Author

Eric F. O'Brien, Jul 02 2013

Keywords

Comments

The number of composites <= 10^7 for which the n-th prime is the least prime factor.
The number of multiples of the n-th prime <= 10^7 that do not have any prime < the n-th prime as a factor.
The greatest n for which the n-th prime is a multiple <= 10^7 without a prime factor < n-th prime = primepi(sqrt(10^7)).

Examples

			For n = 2, prime(n) = 3, a(n) = 1666666: 3 divides 10^7 3333333 times.
6 is the common multiple of 2 and 3, thus 10^7 \ 6 multiples of 3 (1666666) have already been eliminated by a(1).
3333333 less 1666666 = 1666667, less 1 because 3 itself is not eliminated.
Thus a(2) = 3333333 - 1666666 - 1 = 1666666.
		

Crossrefs

Formula

a(1) = 10^7 \ 2 - 1.
a(2) = 10^7 \ 3 - 10^7 \ 6 - 1.
a(3) = 10^7 \ 5 - 10^7 \ 10 - 10^7 \ 15 + 10^7 \ 30 - 1.

A227797 Number of composites removed in each step in the Sieve of Eratosthenes for 10^8.

Original entry on oeis.org

49999999, 16666666, 6666666, 3809523, 2077920, 1598400, 1128284, 950133, 743581, 564099, 509508, 413103, 362709, 337382, 301484, 261684, 230683, 219393, 196552, 182782, 175351, 159910, 150351, 138581, 125778, 119552, 116075, 110630, 107564, 102739, 90485
Offset: 1

Views

Author

Eric F. O'Brien, Jul 31 2013

Keywords

Comments

The number of composites <= 10^8 for which the n-th prime is the least prime factor.
pi(sqrt(10^8)) = the number of terms of A227797.
The sum of a(n) for n = 1..1229 = A000720(10^8) + A065855(10^8).

Examples

			For n = 3, prime(n) = 5, a(n) = 6666666: 5 divides 10^8 20000000 times. 10 is the least common multiple of 2 (prime(1)) and 5 and 15 is the least common multiple of 3 (prime(2)) and 5; thus [10^8 / 10] multiples of 5 and [10^8 / 15] multiples of 5 have already been eliminated by a(1) and a(2), and thereby respectively reduce a(3) by 10000000 and 6666666 offset by [10^8 / 30] multiples of 5 which would otherwise excessively reduce a(3) by 3333333 because 30 is the least common multiple of 2, 3 and 5. a(3) is further reduced by 1 as 5 itself is not eliminated.
		

Crossrefs

Formula

Writing floor(a/b) as [a / b]:
a(1) = [10^8 / 2] - 1.
a(2) = [10^8 / 3] - [10^8 / 6] - 1.
a(3) = [10^8 / 5] - [10^8 / 10] - [10^8 / 15] + [10^8 / 30] - 1.
a(4) = [10^8 / 7] - [10^8 / 14] - [10^8 / 21] - [10^8 / 35] + [10^8 / 42] + [10^8 / 70] + [10^8 / 105] - [10^8 / 210] - 1.

A227798 Number of composites removed in each step of the Sieve of Eratosthenes for 10^9.

Original entry on oeis.org

499999999, 166666666, 66666666, 38095237, 20779220, 15984016, 11282834, 9501331, 7435826, 5640969, 5095068, 4131143, 3627360, 3374293, 3015292, 2616982, 2306411, 2192860, 1963654, 1825278, 1750219, 1595163, 1499127, 1381337, 1253379, 1191536
Offset: 1

Views

Author

Eric F. O'Brien, Jul 31 2013

Keywords

Comments

a(n) = the number of composites <= 10^9 for which the n-th prime is the least prime factor.
pi(sqrt(10^9)) = the number of terms of this sequence.
The sum of a(n) for n = 1..3401 = A000720(10^9) + A065855(10^9).

Examples

			a(1) = 10^9 \ 2 - 1.
a(2) = 10^9 \ 3 - 10^9 \ (2*3) - 1
a(3) = 10^9 \ 5 - 10^9 \ (2*5) - 10^9 \ (3*5) + 10^9 \ (2*3*5) - 1
a(4) = 10^9 \ 7 - 10^9 \ (2*7) - 10^9 \ (3*7) - 10^9 \ (5*7) + 10^9 \ (2*3*7) + 10^9 \ (2*5*7) + 10^9 \ (3*5*7) - 10^9 \ (2*3*5*7) - 1.
		

Crossrefs

A227799 Number of composites removed in each step of the Sieve of Eratosthenes for 10^10.

Original entry on oeis.org

4999999999, 1666666666, 666666666, 380952380, 207792207, 159840159, 112828348, 95013343, 74358271, 56409724, 50950713, 41311372, 36273411, 33742734, 30153115, 26170720, 23065826, 21931483, 19640105, 18256894, 17506397, 15954848, 14993294, 13813524, 12531256
Offset: 1

Views

Author

Eric F. O'Brien, Jul 31 2013

Keywords

Comments

a(n) = the number of composites <= 10^10 for which the n-th prime is the least prime factor.
pi(sqrt(10^10)) = the number of terms of this sequence.
The sum of a(n) for n = 1..3401 = A000720(10^10) + A065855(10^10).

Examples

			a(1) = 10^10 \ 2 - 1.
a(2) = 10^10 \ 3 - 10^10 \ (2*3) - 1.
a(3) = 10^10 \ 5 - 10^10 \ (2*5) - 10^10 \ (3*5) + 10^10 \ (2*3*5) - 1.
a(4) = 10^10 \ 7 - 10^10 \ (2*7) - 10^10 \ (3*7) - 10^10 \ (5*7) + 10^10 \ (2*3*7) + 10^10 \ (2*5*7) + 10^10 \ (3*5*7) - 10^10 \ (2*3*5*7) - 1.
		

Crossrefs

Showing 1-10 of 10 results.