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 23 results. Next

A145540 Number of numbers removed in each step of Eratosthenes's sieve for 10^4.

Original entry on oeis.org

4999, 1666, 666, 380, 207, 159, 110, 94, 76, 59, 56, 46, 41, 37, 33, 27, 23, 21, 17, 15, 12, 9, 8, 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^4 is 10^4 - (sum all of numbers in this sequence) - 1 = A006880(4).

Crossrefs

Programs

  • Maple
    A145540:=Array([seq(0,j=1..25)]): lim:=10^4: p:=Array([seq(ithprime(j),j=1..25)]): for n from 4 to lim do if(isprime(n))then n:=n+1: fi: for k from 1 to 25 do if(n mod p[k] = 0)then A145540[k]:=A145540[k]+1: break: fi: od: od: seq(A145540[j],j=1..25); # 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 = 4; kk = PrimePi[Sqrt[10^nn]]; t3 = f3[10^nn, kk] (* Bob Hanlon (hanlonr(AT)cox.net) *)

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

A139172 a(n) = n!/2 - 1.

Original entry on oeis.org

0, 2, 11, 59, 359, 2519, 20159, 181439, 1814399, 19958399, 239500799, 3113510399, 43589145599, 653837183999, 10461394943999, 177843714047999, 3201186852863999, 60822550204415999, 1216451004088319999, 25545471085854719999, 562000363888803839999, 12926008369442488319999
Offset: 2

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Natural numbers of the form (n!-m)/m:
for m=1 n!-1 see A033312;
for m=3 (n!-3)/3 see A139173;
for m=4 (n!-4)/4 see A139174;
for m=5 (n!-5)/5 see A139175;
for m=6 (n!-6)/6 see A139176;
for m=7 (n!-7)/7 see A139177;
for m=8 (n!-8)/8 see A139183;
for m=9 (n!-9)/9 see A139184;
for m=10 (n!-10)/10 see A139185.
From Artur Jasinski, Oct 14 2008: (Start)
a(n) = Number of numbers removed in first step of Eratosthenes's sieve for n!
a(5)=A145532(1), a(6)=A145533(1), a(7)=A145534(1), a(8)=A145535(1), a(9)=A145536(1), a(10)=A145537(1). (End)
Generally, for n >= m, the formula a(n) = n*(a(n-1) + 1) - 1 applies to all natural numbers of the form (n!-m)/m, m >= 2. - Bob Selcoe, Mar 28 2015

Crossrefs

Programs

Formula

a(n) = Sum_{k=1..floor(n/2)} s(n,n-2*k), where s(n,k) are Stirling numbers of the first kind, A048994. - Mircea Merca, Apr 07 2012
a(n) = n*(a(n-1) + 1) - 1. - Bob Selcoe, Mar 28 2015

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) *)
Showing 1-10 of 23 results. Next