#!/usr/bin/env spython
import sys
from sage.all import *
from random import sample
from collections import Counter
def t(n,k):
return binomial(n-floor((k+1)/2),floor(k/2))
def alpha(n,k):
return (-1)**(k*(k-1)/2)
def pbin(n):
return sum([alpha(n,k)*t(n,k)*x**(n-k) for k in range(n+1)])
def genCyclicPoly(n):
x = var('x')
k = 0
while True:
p = k*n+1
k += 1
if is_prime(p):
break
y = primitive_root(p)
K = CyclotomicField(p,names='a')
a = K.gen()
o = Mod(y**n,p).multiplicative_order()
s = sum([a**((y**n)**i%p) for i in range(o)])
pol = s.minpoly('x')
return (pol,k-1,p,y)
for n in range(1,40+1):
pol,k,p,y = genCyclicPoly(n)
print n
print pol
print
For example for \(n = \frac{17-1}{2} = 8 \) we get the following polynomial:
\[ x^8 + x^7 - 7x^6 - 6x^5 + 15x^4 + 10x^3 - 10x^2 - 4x + 1 \]
Looking at the coefficients of the polynomial and searching for them in OEIS we find the sequence A065941.
Consider the following polynomial:
\[ p(n,x) = \sum_{k=0}^{n} \binom{n-\left \lfloor \frac{k+1}{2} \right \rfloor}{\left \lfloor \frac{k}{2} \right \rfloor} \cdot (-1)^{\frac{k(k+1)}{2}}\cdot x^{n-k} \]
We conjecture that the following is true (let \(p>2\) be prime):
\[ Gal(p(n,x)) = C_n \Leftrightarrow n = \frac{p-1}{2} \Leftrightarrow p(n,x) \text{ is irreducible }\]
If someone finds a proof or a counterexample to this, please let me know.
Mittwoch, 30. September 2015
Computing polynomials with cyclic Galois groups in SAGE
Here is some SAGE code to compute a polynomial with degree \(n\) which has cyclic Galois group.
The computation is done as in the example
https://en.wikipedia.org/wiki/Inverse_Galois_problem#Worked_example:_the_cyclic_group_of_order_three
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen