SharedLin_s_conjecture.sagewsOpen in CoCalc
Author: Konstantin Ziegler
Views : 16
p = 5
m = 3
n = 2*m + 1
q = p^n
var('alpha')
F.<alpha> = GF(q)
alpha == F.primitive_element()

alpha True
# Let's look at the trace and norm of 10 random elements in F

for i in range(10):
x = F.random_element()
print 'We have trace ', x.trace(), 'for ', x

We have trace 0 for 4*alpha^6 + 2*alpha^5 + alpha + 1 We have trace 4 for 3*alpha^6 + 2*alpha^5 + 4*alpha^4 + alpha^3 + alpha^2 + alpha + 4 We have trace 0 for 3*alpha^6 + 2*alpha^5 + 2*alpha^4 + 3*alpha^2 + 4*alpha + 2 We have trace 0 for alpha^6 + 3*alpha^5 + 3*alpha^4 + alpha + 4 We have trace 1 for 2*alpha^5 + alpha^4 + 4*alpha^3 + 2*alpha + 3 We have trace 4 for 4*alpha^6 + alpha^5 + alpha^4 + alpha^3 + alpha^2 + 2*alpha + 3 We have trace 0 for 3*alpha^6 + 3*alpha^4 + 3*alpha^3 + 4*alpha + 2 We have trace 3 for 4*alpha^6 + 2*alpha^5 + 3*alpha^4 + 3*alpha^3 + alpha^2 + alpha We have trace 3 for 2*alpha^6 + 3*alpha^5 + 4*alpha^4 + alpha^2 + 4*alpha + 2 We have trace 2 for alpha^5 + 3*alpha^4 + 3*alpha^3 + 4*alpha^2 + 1
# Produce ternary sequences from trace as suggested by Lin's conjecture
# print first 20 entries

S = [(alpha^i + alpha^((2*3^m + 1)*i)).trace() for i in range(q)]
print 'trace sequence', S[:20]


trace sequence [2, 0, 2, 0, 1, 2, 2, 1, 0, 0, 1, 0, 1, 0, 1, 2, 1, 2, 2, 1]
# Check Lin's conjecture for k = 1,2,...,10 (instead of k = 1..N-1)

def auto_correlation(S, n, k, p=3):
omega = e^(2*pi*I/p)    # primitive p-th root of unity
N = p^n - 1             # period of S
return (sum([omega^(int(S[(i+k)%N] - S[i])) for i in range(N)])).real()

for k in range(1, 10):
print auto_correlation(S, n, k)

-1 -1 -1 -1 -1 -1 -1 -1 -1


# Headline


︠50a5a89d-867b-4419-bc4b-d2a0f6415092︠