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 A141242 #22 Feb 22 2025 16:59:41 %S A141242 2,2,3,2,2,3,2,2,5,2,2,2,3,2,2,2,2,2,2,3,2,2,2,7,2,2,2,2,5,2,2,2,2,2, %T A141242 2,2,2,3,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, %U A141242 2,2,3,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 %N A141242 a(n) is the number of divisors of the n-th positive integer with a prime number of divisors. In other words, a(n) is the number of divisors of A009087(n). %C A141242 A009087(n) is of the form p^(a(n)-1), where p is some prime. %H A141242 Michael De Vlieger, <a href="/A141242/b141242.txt">Table of n, a(n) for n = 1..10000</a> %F A141242 a(n) = A000005(A009087(n)). %t A141242 DivisorSigma[0, #] &@ Select[Range@ 500, PrimeQ@ DivisorSigma[0, #] &] (* _Michael De Vlieger_, Aug 19 2017 *) %o A141242 (Python) %o A141242 from sympy import primepi, integer_nthroot, primerange, factorint %o A141242 def A141242(n): %o A141242 def bisection(f,kmin=0,kmax=1): %o A141242 while f(kmax) > kmax: kmax <<= 1 %o A141242 kmin = kmax >> 1 %o A141242 while kmax-kmin > 1: %o A141242 kmid = kmax+kmin>>1 %o A141242 if f(kmid) <= kmid: %o A141242 kmax = kmid %o A141242 else: %o A141242 kmin = kmid %o A141242 return kmax %o A141242 def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k-1)[0]) for k in primerange(x.bit_length()+1))) %o A141242 return list(factorint(bisection(f,n,n)).values())[0]+1 # _Chai Wah Wu_, Feb 22 2025 %Y A141242 Cf. A000005, A009087, A141241. %K A141242 nonn %O A141242 1,1 %A A141242 _Leroy Quet_, Jun 16 2008 %E A141242 Extended by _Ray Chandler_, Jun 25 2009