Cubic polynomials over finite fields

58 Views Asked by At

I was watching an introduction video on "Tangent conics and tangent quadrics" by Prof. Norbert Wildberger , where the following Taylor polynomial was introduced:

$$p_r(x) = (a+br+cr^2 + dr^3) +(b+cr + 3 *dr^2)(x-r) + (c + 3 *dr)(x-r)^2$$

He chose specific values, $a=5, b = -3, c =-4, d = 1$ and then computed simply the complete table for all $r$ and $x$ over the field $F_{11}$, field modulo 11

He then obtained a very nice result I added at the bottom of this post: There are multiple interesting things to notice, but I found immediately nice that in the first column all values from 0 to 10 appeared and then wondered: How many of these polynomials have this property over this field and other?

Therefore I wrote a Python code snippet and brute forced the count for the fields $F_2$ to $F_{19}$ and got these numbers:

$$16, 70, 198, 698, 1130, 1130, 1130, 1130, 1130, 5130, 18440, 18440, 18440, 18440, 45440, 45440, 124048, 124048, 124048$$

After $N=5$ for $F_N$ a pattern seems to emerge. The question now is: Is there actually a pattern or is it just some coincidence? Can one compute them in a smarter/faster way?

Thank you in advance!

Below the code used to generate the numbers, the table mentioned above and an image of it in case it cannot render.

import numpy as np

tangentConic = lambda a, b, c, d, x, r: (a + b * r + c * r ** 2 + d * r ** 3) + \
                                        (b + 2 * c * r + 3 * d * r ** 2) * (x - r) + \
                                        (c + 3 * d * r) * (x - r) ** 2

Ns = np.arange(2, 20)
count = 0
for N in Ns:
    for a in range(N):
        for b in range(N):
            for c in range(N):
                for d in range(N):
                    computes = np.zeros((N, N))
                    for j in range(0, N):  # a-xis shift
                        for i in range(0, N):  # x axis
                            res = tangentConic(a, b, c, d, i, j)
                            red = res % N
                            computes[N - 1 - red, i] = j
                    complete = True
                    firstCol = computes[:, 0]
                    for num in range(N):
                        if num in firstCol:
                            continue
                        else:
                            complete = False
                    if complete:
                        count = count + 1
    print("N: ", N, "count: ", count)

\begin{array} {|r|r|} \hline 3 & 1 & 4 & 4 & 1 & 2 & 3 & 7 & 2 & 10 & 5 \\ \hline 5 & 0 & 8 & 3 & 7 & 8 & 9 & 6 & 6 & 9 & 7 \\ \hline 9 & 5 & 10 & 2 & 9 & 10 & 0 & 0 & 4 & 8 & 2 \\ \hline 7 & 3 & 5 & 7 & 2 & 3 & 4 & 9 & 9 & 2 & 4 \\ \hline 1 & 7 & 7 & 5 & 0 & 1 & 2 & 2 & 8 & 0 & 8 \\ \hline 0 & 9 & 0 & 9 & 5 & 6 & 7 & 4 & 7 & 4 & 6 \\ \hline 10 & 4 & 9 & 0 & 4 & 5 & 6 & 10 & 1 & 6 & 0 \\ \hline 4 & 6 & 3 & 6 & 3 & 4 & 5 & 1 & 10 & 1 & 10 \\ \hline 1 & 10 & 2 & 8 & 8 & 9 & 9 & 10 & 5 & 3 & 9 \\ \hline 6 & 8 & 1 & 1 & 6 & 7 & 8 & 3 & 5 & 7 & 3 \\ \hline 8 & 2 & 6 & 10 & 10 & 0 & 1 & 8 & 0 & 5 & 1 \\ \hline \end{array}

enter image description here