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.

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

This page as a plain text file.
%I A145539 #19 Feb 23 2019 19:50:29
%S A145539 499999,166666,66666,38094,20778,15983,11283,9502,7434,5646,5098,4136,
%T A145539 3617,3356,2982,2575,2261,2143,1910,1775,1700,1553,1460,1354,1244,
%U A145539 1195,1171,1130,1109,1074,964,937,898,886,832,820,794,763,745,719,697,689,654
%N A145539 Number of numbers removed in each step of Eratosthenes's sieve for 10^6.
%C A145539 Number of steps in Eratosthenes's sieve for 10^n is A122121(n).
%C A145539 Number of primes less than 10^6 equals 10^6 - A065894(6) (sum of all numbers in this sequence) - 1 = A006880(6).
%C A145539 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
%H A145539 Nathaniel Johnston, <a href="/A145539/b145539.txt">Table of n, a(n) for n = 1..168</a> (full sequence)
%p A145539 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
%t A145539 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) *)
%Y A145539 Cf. A006880, A122121, A145532-A145540.
%Y A145539 Cf. A065894, A020639.
%K A145539 fini,full,nonn
%O A145539 1,1
%A A145539 _Artur Jasinski_ with assistance from Bob Hanlon (hanlonr(AT)cox.net), Oct 14 2008