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.
%I A128301 #29 Jul 23 2024 15:03:58 %S A128301 1,3,9,17,40,56,90,114,164,253,289,404,484,533,634,783,973,1031,1233, %T A128301 1373,1452,1683,1842,2112,2483,2676,2779,2995,3108,3320,4124,4384, %U A128301 4775,4926,5593,5741,6172,6644,6962,7448,7955,8108,8978,9147,9512,9697,10842 %N A128301 Indices of squares (of primes) in the semiprimes. %C A128301 A001358(a(n)) = A001248(n) = A000040(n)^2. %C A128301 Numbers n with property that tau(semiprime(n)) is not semiprime. - _Juri-Stepan Gerasimov_, Oct 15 2010 %H A128301 Zak Seidov, <a href="/A128301/b128301.txt">Table of n, a(n) for n = 1..10000</a> %e A128301 a(4) = 17 as 49 = 7^2 = prime(4)^2, the fourth square in the semiprimes, is the seventeenth semiprime. %t A128301 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 *) %o A128301 (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 %o A128301 (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 %o A128301 \\ _Charles R Greathouse IV_, Apr 21 2011 %o A128301 (Python) %o A128301 from math import isqrt %o A128301 from sympy import prime, primepi %o A128301 def A128301(n): %o A128301 m = prime(n)**2 %o A128301 return int(sum(primepi(m//prime(k))-k+1 for k in range(1,n+1))) # _Chai Wah Wu_, Jul 23 2024 %Y A128301 Cf. A128302, A001358, A001248, A072000. %K A128301 nonn %O A128301 1,2 %A A128301 _Rick L. Shepherd_, Feb 25 2007