OFFSET
1,1
COMMENTS
Numbers that are the product of exactly 3 distinct squares of primes (p^2*q^2*r^2).
FORMULA
A050326(a(n)) = 8. - Reinhard Zumkeller, May 03 2013
Sum_{n>=1} 1/a(n) = (P(2)^3 + 2*P(6) - 3*P(2)*P(4))/6 = (A085548^3 + 2*A085966 - 3*A085548*A085964)/6 = 0.0036962441..., where P is the prime zeta function. - Amiram Eldar, Oct 30 2020
EXAMPLE
900 = 2^2*3^2*5^2, 1764 = 2^2*3^2*7^2, 4356 = 2^2*3^2*11^2, ..
MATHEMATICA
fQ[n_]:=Last/@FactorInteger[n]=={2, 2, 2}; Select[Range[100000], f]
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A162143(n):
def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a, k in enumerate(primerange(integer_nthroot(x, 3)[0]+1), 1) for b, m in enumerate(primerange(k+1, isqrt(x//k)+1), a+1)))
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
return bisection(f)**2 # Chai Wah Wu, Aug 29 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jun 25 2009
EXTENSIONS
Edited by N. J. A. Sloane, Jun 27 2009
STATUS
approved