Giuga's conjecture (1950), which is still open and has strong numerical support, reads :



> 
> Let $n$ be a positive integer. If $1+\sum\_{k=1}^{n-1}k^{n-1} \equiv 0\pmod{n}$ then $n$ is prime.
> 
> 
> 


What would an analog for function fields be?



What is a function field analog of Giuga's conjecture?
The integers 1 to $n-1$ are the non-zero elements of $\mathbb Z/n\mathbb Z$. So one could take an ideal $I$ in a Dedekind domain $R$ and ask whether
$$
(\*)\qquad
1+\sum\_{\substack{a\in R/I\\ a\ne0\\}} a^{\#R/I - 1} \equiv 0 \pmod{I}
$$
is equivalent to $I$ being a prime ideal. I have no idea whether this is a reasonable question, since I have not done any experiements (I'll let you try), but this or something similar seems like a natural generalization.


**Addendum:** I did some experiments with $R=\mathbb F\_p[x]$ and $I=(f(x))$. For the cases
$$
p=2~\text{and}~\deg(f)\le8,\qquad
p=3~\text{and}~\deg(f)\le4,\qquad
p=5~\text{and}~\deg(f)\le3,
$$
it is true that
$$
\text{$(\*)$ is true}\quad\Longleftrightarrow\quad
\text{$f(x)$ is irreducible in $\mathbb F\_p[x]$.}
$$


