OFFSET
1,2
COMMENTS
Numbers n with property that tau(semiprime(n)) is not semiprime. - Juri-Stepan Gerasimov, Oct 15 2010
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 17 as 49 = 7^2 = prime(4)^2, the fourth square in the semiprimes, is the seventeenth semiprime.
MATHEMATICA
With[{sp=Select[Range[50000], PrimeOmega[#]==2&]}, Flatten[Table[ Position[ sp, Prime[ n]^2], {n, Floor[Sqrt[Length[sp]]]}]]] (* Harvey P. Dale, Nov 17 2014 *)
PROG
(Perl) -MMath::Pari=factorint, PARI -wle 'my $c = 0; my $s = PARI 1; while (1) { ++$s; my($sp, $si) = @{factorint($s)}; next if @$sp > 2; next if $si->[0] + (@$si > 1 ? $si->[1] : 0) != 2; ++$c; print "$s => $c" if @$sp == 1}' # Hugo van der Sanden, Sep 25 2007
(PARI) a(n)=my(s=0, i=0); n=prime(n)^2; forprime(p=2, sqrt(n), s+=primepi(n\p); i++); s - i * (i-1)/2
\\ Charles R Greathouse IV, Apr 21 2011
(Python)
from math import isqrt
from sympy import prime, primepi
def A128301(n):
m = prime(n)**2
return int(sum(primepi(m//prime(k))-k+1 for k in range(1, n+1))) # Chai Wah Wu, Jul 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Feb 25 2007
STATUS
approved