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.

A072047 Number of prime factors of the squarefree numbers: omega(A005117(n)).

This page as a plain text file.
%I A072047 #34 Sep 21 2024 14:36:33
%S A072047 0,1,1,1,2,1,2,1,1,2,2,1,1,2,2,1,2,1,3,1,2,2,2,1,2,2,1,3,1,2,1,2,1,2,
%T A072047 2,2,1,1,2,2,3,1,2,3,1,1,2,2,3,1,2,1,2,2,2,1,2,2,2,2,1,1,3,1,3,2,1,1,
%U A072047 3,2,1,3,2,2,2,2,2,1,2,3,1,2,2,1,3,1,2
%N A072047 Number of prime factors of the squarefree numbers: omega(A005117(n)).
%C A072047 For n > 1: length of row n in A265668. - _Reinhard Zumkeller_, Dec 13 2015
%H A072047 Reinhard Zumkeller, <a href="/A072047/b072047.txt">Table of n, a(n) for n = 1..10000</a>
%H A072047 Rafael Jakimczuk and Matilde Lalín, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL25/Lalin/lalin2.html">The Number of Prime Factors on Average in Certain Integer Sequences</a>, Journal of Integer Sequences, Vol. 25 (2022), Article 22.2.3.
%F A072047 a(n) = A001221(A005117(n)) = A001222(A005117(n)).
%F A072047 Sum_{A005117(k) <= x} a(k) = (1/zeta(2))*x*log(log(x)) + O(x) (Jakimczuk and Lalín, 2022). - _Amiram Eldar_, Feb 18 2023, corrected Sep 21 2024
%t A072047 PrimeOmega[Select[Range[200],SquareFreeQ]] (* _Harvey P. Dale_, May 14 2011 *)
%o A072047 (Haskell)
%o A072047 a072047 n = a072047_list !! (n-1)
%o A072047 a072047_list = map a001221 $ a005117_list
%o A072047 -- _Reinhard Zumkeller_, Aug 08 2011
%o A072047 (PARI) apply(omega, select(issquarefree, [1..200])) \\ _Michel Marcus_, Nov 25 2022
%o A072047 (Python)
%o A072047 from math import isqrt
%o A072047 from sympy import mobius, primenu
%o A072047 def A072047(n):
%o A072047     def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
%o A072047     def bisection(f,kmin=0,kmax=1):
%o A072047         while f(kmax) > kmax: kmax <<= 1
%o A072047         while kmax-kmin > 1:
%o A072047             kmid = kmax+kmin>>1
%o A072047             if f(kmid) <= kmid:
%o A072047                 kmax = kmid
%o A072047             else:
%o A072047                 kmin = kmid
%o A072047         return kmax
%o A072047     return primenu(bisection(f)) # _Chai Wah Wu_, Aug 31 2024
%Y A072047 Cf. A072048.
%Y A072047 Cf. A001221, A001222, A013661, A005117, A265668.
%K A072047 nonn,nice
%O A072047 1,5
%A A072047 _Reinhard Zumkeller_, Jun 09 2002