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.

A123073 Number of ordered triples of primes (p,q,r) such that pqr = n-th 3-almost prime A014612(n).

This page as a plain text file.
%I A123073 #9 Oct 20 2024 12:38:51
%S A123073 1,3,3,3,1,3,6,6,3,3,3,3,3,6,3,6,3,3,6,3,3,3,6,6,6,6,3,3,3,1,6,6,3,3,
%T A123073 3,6,3,6,6,3,3,6,3,6,6,3,6,6,3,3,6,6,6,3,6,3,3,3,6,6,6,3,6,3,6,3,3,6,
%U A123073 3,6,6,6,3,6,3,6,6,3,3,3,3,1,6,6,3,6,3,6,3,6,6,6,3,3,6,6,3,6,6,3,6,3,3,6,3
%N A123073 Number of ordered triples of primes (p,q,r) such that pqr = n-th 3-almost prime A014612(n).
%C A123073 The nonzero subsequence of A123074.
%o A123073 (Python)
%o A123073 from math import isqrt
%o A123073 from sympy import primepi, primerange, integer_nthroot, primefactors
%o A123073 def A123073(n):
%o A123073     def bisection(f,kmin=0,kmax=1):
%o A123073         while f(kmax) > kmax: kmax <<= 1
%o A123073         while kmax-kmin > 1:
%o A123073             kmid = kmax+kmin>>1
%o A123073             if f(kmid) <= kmid:
%o A123073                 kmax = kmid
%o A123073             else:
%o A123073                 kmin = kmid
%o A123073         return kmax
%o A123073     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)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
%o A123073     return (1,3,6)[len(primefactors(bisection(f,n,n)))-1] # _Chai Wah Wu_, Oct 20 2024
%Y A123073 Cf. A123074, A014612.
%K A123073 nonn
%O A123073 1,2
%A A123073 _N. J. A. Sloane_ and T. D. Noe, Sep 29 2006
%E A123073 More terms from _T. D. Noe_, Sep 29 2006