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.

A085770 Number of odd semiprimes < 10^n. Number of terms of A046315 < 10^n.

This page as a plain text file.
%I A085770 #25 Oct 17 2024 17:41:15
%S A085770 0,1,19,204,1956,18245,168497,1555811,14426124,134432669,1258822220,
%T A085770 11840335764,111817881036,1059796387004,10076978543513,96091983644261,
%U A085770 918679875630905,8803388145953381,84537081118605467,813340036541900706,7838825925851034479,75669246175972479567
%N A085770 Number of odd semiprimes < 10^n. Number of terms of A046315 < 10^n.
%F A085770 a(n) = A066265(n) - A220262(n) for n > 1. - _Jinyuan Wang_, Jul 30 2021
%e A085770 a(1)=1 because A046315(1)=9=3*3 is the only odd semiprime < 10^1,
%e A085770 a(2)=19 because there are 19 terms of A046315 < 10^2.
%t A085770 OddSemiPrimePi[n_] := Sum[ PrimePi[n/Prime@i] - i + 1, {i, 2, PrimePi@ Sqrt@ n}]; Table[ OddSemiPrimePi[10^n], {n, 14}] (* _Robert G. Wilson v_, Feb 02 2006 *)
%o A085770 (Python)
%o A085770 from math import isqrt
%o A085770 from sympy import primepi, primerange
%o A085770 def A085770(n): return int((-(t:=primepi(s:=isqrt(m:=10**n)))*(t-1)>>1)+sum(primepi(m//k) for k in primerange(3, s+1))) if n>1 else n # _Chai Wah Wu_, Oct 17 2024
%Y A085770 Cf. A046315 (odd numbers divisible by exactly 2 primes), A066265 (number of semiprimes < 10^n), A220262, A292785.
%K A085770 nonn
%O A085770 0,3
%A A085770 _Hugo Pfoertner_, Jul 22 2003
%E A085770 a(10)-a(14) from _Robert G. Wilson v_, Feb 02 2006
%E A085770 a(15)-a(16) from _Donovan Johnson_, Mar 18 2010
%E A085770 a(0) inserted by and a(17)-a(21) from _Jinyuan Wang_, Jul 30 2021