OFFSET
1,5
COMMENTS
For n > 1: length of row n in A265668. - Reinhard Zumkeller, Dec 13 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Rafael Jakimczuk and Matilde Lalín, The Number of Prime Factors on Average in Certain Integer Sequences, Journal of Integer Sequences, Vol. 25 (2022), Article 22.2.3.
FORMULA
MATHEMATICA
PrimeOmega[Select[Range[200], SquareFreeQ]] (* Harvey P. Dale, May 14 2011 *)
PROG
(Haskell)
a072047 n = a072047_list !! (n-1)
a072047_list = map a001221 $ a005117_list
-- Reinhard Zumkeller, Aug 08 2011
(PARI) apply(omega, select(issquarefree, [1..200])) \\ Michel Marcus, Nov 25 2022
(Python)
from math import isqrt
from sympy import mobius, primenu
def A072047(n):
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+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 primenu(bisection(f)) # Chai Wah Wu, Aug 31 2024
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Jun 09 2002
STATUS
approved