login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066265 Number of semiprimes < 10^n. 25
0, 3, 34, 299, 2625, 23378, 210035, 1904324, 17427258, 160788536, 1493776443, 13959990342, 131126017178, 1237088048653, 11715902308080, 111329817298881, 1061057292827269, 10139482913717352, 97123037685177087 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Apart from the first nonzero term the sequence is identical to A036352. - Hugo Pfoertner, Jul 22 2003

LINKS

Table of n, a(n) for n=0..18.

Eric Weisstein's World of Mathematics, Semiprime

Index entries for sequences related to numbers of primes in various ranges

FORMULA

(1/2)*( Pi(10^(n/2)) + Sum_{i=1..Pi(10^n)} Pi( (10^n-1)/P_i) ) = Sum_{i=1..Pi(sqrt(10^n))} Pi( (10^n-1)/P_i ) - Binomial( Pi(sqrt(10^n)), 2). - Robert G. Wilson v, May 16 2005

EXAMPLE

Below 10 there are three semiprimes: 4 (2*2), 6 (2*3) and 9 (3*3).

MATHEMATICA

f[n_] := Sum[ PrimePi[(10^n - 1)/Prime[i]], {i, PrimePi[ Sqrt[10^n]]}] - Binomial[ PrimePi[ Sqrt[10^n]], 2]; Do[ Print[ f[n]], {n, 0, 14}] (* Robert G. Wilson v, May 16 2005 *)

PROG

(PARI) a(n)=my(s); forprime(p=2, sqrt(10^n), s+=primepi((10^n-1)\p)); s-binomial(primepi(sqrt(10^n)), 2) \\ Charles R Greathouse IV, Apr 23 2012

(Perl) use Math::Prime::Util qw/:all/; use integer; sub countsp { my($k, $sum, $pc)=($_[0]-1, 0, 1); prime_precalc(60_000_000); forprimes { $sum += prime_count($k/$_) + 1 - $pc++; } int(sqrt($k)); $sum; } foreach my $n (0..16) { say "$n: ", countsp(10**$n); } # Dana Jacobsen, May 11 2014

CROSSREFS

Cf. A001358, A064911, A072000, A036352 (identical starting from a(2)).

Sequence in context: A121077 A024396 A246384 * A231593 A134491 A045727

Adjacent sequences:  A066262 A066263 A066264 * A066266 A066267 A066268

KEYWORD

nonn

AUTHOR

Patrick De Geest, Dec 10 2001

EXTENSIONS

More terms from Hugo Pfoertner, Jul 22 2003

a(14) from Robert G. Wilson v, May 16 2005

a(15)-a(16) from Donovan Johnson, Mar 18 2010

a(17)-a(18) from Dana Jacobsen, May 11 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified December 21 18:55 EST 2014. Contains 252325 sequences.