素数・素数階乗・高度合成数
$ 10^n 未満のそれぞれの最大の一覧
table:prime
上限 素数
10^1 7
10^2 97
10^3 997
10^4 9973
10^5 99991
10^6 999983
10^7 9999991
10^8 99999989
10^9 999999937
10^10 9999999967
10^11 99999999977
10^12 999999999989
10^13 9999999999971
10^14 99999999999973
10^15 999999999999989
10^16 9999999999999937
10^17 99999999999999997
10^18 999999999999999989
table:primorial
上限 値 素因数の個数
10^1 6 2
10^2 30 3
10^3 210 4
10^4 2310 5
10^5 30030 6
10^6 510510 7
10^7 9699690 8
10^8 9699690 8
10^9 223092870 9
10^10 6469693230 10
10^11 6469693230 10
10^12 200560490130 11
10^13 7420738134810 12
10^14 7420738134810 12
10^15 304250263527210 13
10^16 304250263527210 13
10^17 13082761331670030 14
10^18 614889782588491410 15
table:highcomposite
上限 値 約数の個数
10^1 6 4
10^2 60 12
10^3 840 32
10^4 7560 64
10^5 83160 128
10^6 720720 240
10^7 8648640 448
10^8 73513440 768
10^9 735134400 1344
10^10 6983776800 2304
10^11 97772875200 4032
10^12 963761198400 6720
10^13 9316358251200 10752
10^14 97821761637600 17280
10^15 866421317361600 26880
10^16 8086598962041600 41472
10^17 74801040398884800 64512
10^18 897612484786617600 103680
探索コード
code:prime.py
for n in range(1, 19):
lim = 10**n # 上限
for p in range(lim-1, -1, -1):
if isPrime(p):
print(f'{lim} {p}')
break
code:primorial.py
for p in range(100):
if isPrime(p):
primorial.append(primorial-1 * p) import bisect
for n in range(1, 19):
lim = 10**n
idx = bisect.bisect_left(primorial, lim) - 1
print(f'{lim} {primorialidx} {idx}') code:highcomposite.py
import bisect
highcomposite = hcn_heapq(10**18) # 高度合成数を列挙
for n in range(1, 19):
lim = 10**n # 上限
idx = bisect.bisect_left(highcomposite, (lim, )) - 1
print(f'{lim} {highcompositeidx0} {highcompositeidx1}')