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.

A106426 Smallest number beginning with 6 and having exactly n prime divisors counted with multiplicity.

This page as a plain text file.
%I A106426 #7 Sep 12 2024 19:13:22
%S A106426 61,6,63,60,612,64,648,640,6048,6400,6912,6144,62208,61440,602112,
%T A106426 65536,663552,655360,6029312,6553600,60162048,6291456,63700992,
%U A106426 62914560,616562688,67108864,679477248,603979776,6115295232,6039797760
%N A106426 Smallest number beginning with 6 and having exactly n prime divisors counted with multiplicity.
%e A106426 a(4) = 60 = 2^2*3*5.
%o A106426 (Python)
%o A106426 from itertools import count
%o A106426 from math import isqrt, prod
%o A106426 from sympy import primerange, integer_nthroot, primepi
%o A106426 def A106426(n):
%o A106426     if n == 1: return 61
%o A106426     def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
%o A106426     def f(x): return int(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n)))
%o A106426     for l in count(len(str(1<<n))-1):
%o A106426         kmin, kmax = 6*10**l-1, 7*10**l-1
%o A106426         mmin, mmax = f(kmin), f(kmax)
%o A106426         if mmax>mmin:
%o A106426             while kmax-kmin > 1:
%o A106426                 kmid = kmax+kmin>>1
%o A106426                 mmid = f(kmid)
%o A106426                 if mmid > mmin:
%o A106426                     kmax, mmax = kmid, mmid
%o A106426                 else:
%o A106426                     kmin, mmin = kmid, mmid
%o A106426     return kmax # _Chai Wah Wu_, Sep 12 2024
%Y A106426 Cf. A077326-A077334, A106411-A106419, A106421-A106429.
%K A106426 base,nonn
%O A106426 1,1
%A A106426 _Ray Chandler_, May 02 2005