% EJC papers *must* begin with the following two lines. 
\documentclass[12pt]{article}
\usepackage{e-jc}

% Please remove all other commands that change parameters such as
% margins or pagesizes.

% only use standard LaTeX packages
% only include packages that you actually need

% we recommend these ams packages
\usepackage{amsthm,amsmath,amssymb}

% we recommend the graphicx package for importing figures
\usepackage{graphicx}

% use this command to create hyperlinks (optional and recommended)
\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

% use these commands for typesetting doi and arXiv references in the bibliography
\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\texttt{doi:#1}}}
\newcommand{\arxiv}[1]{\href{http://arxiv.org/abs/#1}{\texttt{arXiv:#1}}}

% all overfull boxes must be fixed; 
% i.e. there must be no text protruding into the margins


% declare theorem-like environments
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{claim}[theorem]{Claim}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{open}[theorem]{Open Problem}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{question}[theorem]{Question}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{note}[theorem]{Note}

% here below added, by luis,  a few lines with mathbb characters
\def\N{\mathbb{N}}
\def\R{\mathbb{R}}
\def\Z{\mathbb{Z}}
\def\C{\mathbb{C}}
\def\Q{\mathbb{Q}}
\def\P{\mathbb{P}}
\def\I{\mathbb{I}}
\def\F{\mathbb{F}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% if needed include a line break (\\) at an appropriate place in the title

\title{\bf Bell numbers modulo a prime number, traces and trinomials}

% input author, affilliation, address and support information as follows;
% the address should include the country, and does not have to include
% the street address 

\author{Luis H. Gallardo\\
\small Mathematics\\[-0.8ex]
\small University of Brest\\[-0.8ex] 
\small Brest, France\\
\small\tt Luis.Gallardo@univ-brest.fr\\
\and
Olivier Rahavandrainy\\
\small Mathematics\\[-0.8ex]
\small University of Brest\\[-0.8ex]
\small Brest, France\\
\small\tt Olivier.Rahavandrainy@univ-brest.fr
}

% \date{\dateline{submission date}{acceptance date}\\
% \small Mathematics Subject Classifications: comma separated list of
% MSC codes available from http://www.ams.org/mathscinet/freeTools.html}

\date{\dateline{Jul 2, 2013}{Jan 2, 2012}\\
\small Mathematics Subject Classifications: 11T55, 11T06, 11B73, 11B65, 05A10, 12E20}

\begin{document}

\maketitle

% E-JC papers must include an abstract. The abstract should consist of a
% succinct statement of background followed by a listing of the
% principal new results that are to be found in the paper. The abstract
% should be informative, clear, and as complete as possible. Phrases
% like "we investigate..." or "we study..." should be kept to a minimum
% in favor of "we prove that..."  or "we show that...".  Do not
% include equation numbers, unexpanded citations (such as "[23]"), or
% any other references to things in the paper that are not defined in
% the abstract. The abstract will be distributed without the rest of the
% paper so it must be entirely self-contained.

\begin{abstract}
Given a prime number $p$, we deduce from a formula of Barsky and Benzaghou 
and from a result of Coulter and Henderson on trinomials over finite fields, 
a simple necessary and sufficient condition $\beta(n) =k\beta(0)$ in $\F_{p^p}$
in order to resolve the congruence
$B(n) \equiv k \pmod{p}$, where $B(n)$ is the $n$-th Bell number, and $k$
is any fixed integer. 
Several applications of the formula and of the condition
are included, in particular we give equivalent forms of
the conjecture of Kurepa that
$B(p-1)$ is $\neq 1$ modulo $p.$ 

  % keywords are optional
  \bigskip\noindent \textbf{Keywords:} Finite Fields; Trinomials;
 Artin-Schreier extension; Bell numbers; Stirling numbers; Kurepa's Conjecture
\end{abstract}

\section{Introduction}

\begin{definition}
\label{bells}
The Bell numbers $B(n)$ are defined by
$B(0) := 1,$ and 
$B(n+1) := \sum_{k=0}^{n} \binom{n}{k}B(k).$
\end{definition}

The Bell numbers $B(n)$ are positive integers that arise in combinatorics.  Besides  the definition  \ref{bells}
that appears in \cite{beckerriordan},
other definitions, or characterizations, exist
(see, e.g. \cite{samw1}, \cite{daltonlevine}, \cite[page 371]{ocagne}, \cite{aigner}).
Williams \cite{williams} proved that, for each prime number $p,$ the sequence
$B(n) \pmod {p}$ is periodic. 
In all the paper we keep the following notations. We denote by $p$ an odd prime number.
We call an integer $d$ a \emph{period} of $B(n) \pmod{p}$ if for all nonnegative integers
$n$ one has $B(n+d) \equiv B(n) \pmod{p}.$   We set $q :=p^p$; $\F_p$ is the finite field with
$p$ elements, and $\F_q$ is the finite field with $q$ elements, the Artin-Schreier 
extension of degree $p$ of $\F_p$ generated
by an element $r$, a root of the irreducible trinomial $x^p-x-1$ in some fixed algebraic closure of $\F_p.$
We denote by $\textrm{\textrm{Tr}}$ the trace function from $\F_q$ onto $\F_p,$ we denote by $N$ the norm
function from $\F_q$ onto $\F_p.$
We put $c(p) :=1+2p+3p^2+ \cdots+(p-1)p^{p-2}.$

In all the paper we use also the following definition, that is a variant of the definition in
 (see, e.g., \cite[pages 248--250]{knuthGP}),
of the falling and rising powers.
\begin{definition}
\label{epsilons}
Set $\epsilon(i) :=(r+i+1) \cdots (r+p-1)$ in $\F_{q}$ for $i=0, \ldots ,p-2$, and $\epsilon(p-1) := 1, \epsilon(p) := \epsilon(0).$
Set  $\delta(0) := r,$
$\delta(i) := r(r+1) \cdots (r+i)$ in $\F_{q}$ for $i=1, \ldots ,p-2$ and 
$\delta(p-1) := N(r) = 1$. More generally, we extend the definition to any integer
$n$ by putting $\epsilon(n) := \epsilon(n \pmod{p}),$ and $\delta(n) := \delta(n \pmod{p}).$
\end{definition}

The main new idea in the paper (\cite{barskyb1}, \cite{barskyb2}) of Barsky and Benzaghou, 
consists of the observation that the Bell
number $B(n)$
modulo $p$ is related to the trace of a special element in $\F_q$
(see \cite[Th\'eor\`eme 2]{barskyb1}).  More precisely one has

\begin{lemma}
\label{BB}
\begin{equation}
\label{trace}
B(n) \equiv - \emph{\textrm{Tr}}(r^{c(p)}) \emph{\textrm{Tr}}(r^{n -c(p)-1}) \pmod{p}.
\end{equation}
\end{lemma}

Since $\textrm{Tr}(r^{c(p)}) \not \equiv 0 \pmod{p}$ (see Lemma \ref{nonzerocp}) one sees immediately
by using the Additive Hilbert's Theorem $90$
that $B(n) \equiv 0 \pmod{p}$ is equivalent to the existence of
some $\lambda \in \F_q$
such that
\begin{equation*}
\label{prerobcoulter}
r^{n -c(p)-1} = \lambda^p - \lambda. 
\end{equation*}
By the change of variable $\gamma = r^{c(p)}\lambda$, we are reduced (see the details in Theorem \ref{cepe})
to study the trinomial
equation
\begin{equation*}
\label{preprerobcoulter}
\gamma^p -r \gamma - r^n = 0
\end{equation*}
over $\F_q.$ But Coulter and Henderson (\cite{rcoulter}, Lemma \ref{robresult}) have given an explicit condition
for the solvability of the more general trinomial equation 
\begin{equation}
\label{robcoulter}
x^{p^s} - ax -b =0
\end{equation}
over the finite field $\F_{p^k}$.

Hence we can give a necessary and sufficient condition
in order that $B(n) \equiv 0 \pmod{p}$, namely:

\begin{theorem}
\label{beta}
Let $p>2$ be a prime number, and let $n$ be a positive integer. 
Set $\beta(n) := \sum_{i=0}^{p-1} (r+i)^n \epsilon(i).$
Then $B(n) \equiv 0 \pmod{p}$ has a positive integer solution $n$ if and only if $\beta(n) = 0$. Moreover 
$\beta(n)^p=r\beta(n).$
\end{theorem}

The special case $s=1$ of ( \ref{robcoulter}) had already been considered, but in a less detailed form,
by Segre (see \cite[page 200]{bsegre}) and also by Svarc (see \cite{svarc}).

The following lemma is a result of Touchard (see \cite{touchard}).

\begin{lemma}
(Touchard's Congruence)
\label{touchardlemma}
Let $p$ be an odd prime number. Then for any nonnegative number $n$ one has
$$
B(n)+B(n+1) \equiv B(n+p)  \pmod{p}.
$$
\end{lemma}

The following result will be used extensively.

\begin{lemma}
\label{kurepaperiod}
Let $d$ be any period of the sequence $B(n) \pmod{p}$. Then $B(p-1) \equiv 1 \pmod{p}$ is equivalent
to $B(d-1) \equiv 0 \pmod{p}.$
\end{lemma}

\begin{proof}
By Touchard's congruence (see Lemma \ref{touchardlemma}) one has $B(d-1)+B(d) \equiv B(d-1+p) \pmod{p}$, 
but $B(d-1+p) \equiv B(p-1) \pmod{p}$ and $B(d) \equiv B(0) \equiv 1 \pmod{p}.$  Thus, 
$B(p-1) \equiv B(d-1)+1 \pmod{p}.$ This proves the result.
\end{proof}

Moreover, 
it is interesting to observe that the minimal period of $B(n) \pmod{p}$ is conjectured, but not proved,
(see \cite{samw1}, \cite{caretal}, \cite{lunnonPS}, \cite{radoux1}, \cite{carlitzB}, \cite{daltonlevine}, \cite{beckerriordan}),
to be equal to $g(p),$ where $g(p) := 1+p+p^2+ \cdots +p^{p-1}.$

Now, we discuss a little some applications (see Sections \ref{toformulae} and \ref{tokurepa})
of the formula (\ref{trace}) and of Theorem \ref{beta}. 

Recall that a Stirling number $S(n,k)$ of the second kind (see \cite{beckerriordan}), 
count the number of ways to partition a set of $n$ elements into $k$ nonempty subsets.
We will show (see Section \ref{toformulae}) that the numbers $S_{p,r}(n,k) := (r+k)^n \epsilon(k) \in \F_q$,
appearing as additive components of $\beta(n)$,
are good $\F_q$ analogues of the Stirling numbers of the second kind $S(n,k),$ modulo $p,$
since $\textrm{Tr}(S_{p,r}(n,k))$ satisfies the same main recurrence as the $S(n,k)$ in $\F_p$, but  with different initial conditions,
(see the details in Theorem \ref{stirling2k}).

Moreover, in Theorem \ref{stirlingbasis} we show an interesting relation between the dimension of the $\F_p$ vectorial space
generated by these generalized Stirling numbers and the zeros of $\beta$ in $\F_q.$

But, (see Theorem \ref{betatrace}) the $\beta(n)$'s themselves, are good generalizations of the Bell numbers, modulo $p$,
since in $\F_p$ one has
\begin{equation}
\label{stirlingFq}
B(n) = - \textrm{Tr}(\beta(n)).
\end{equation}
We can then characterize the $n$'s such that $B(n) \equiv k \pmod{p}$  for any $k$ (see Theorem \ref{bellequalk})
that generalizes Theorem \ref{beta}.

More relations between $B(n)$ and $\beta(n)$ are shown  in Section \ref{toformulae},
including (see Theorem \ref{normofbeta}) the computation of the norm of $\beta(n).$

Moreover, (see Section \ref{tokurepa}) we can then extend to $\F_q$ a formula of Sun and Zagier (see \cite{sunzagier})
relating Bell numbers
and derangement numbers.
Furthermore,  by combining both forms (\ref{trace}) and (\ref{stirlingFq}) of $B(n)$
several new equivalents of Kurepa's conjecture  (see Theorem \ref{equivkurepa}) are proposed. 
In particular a special case of
Theorem \ref{stirlingbasis} holds,
(see condition (q) inTheorem \ref{equivkurepa}), so that
the conjecture is equivalent
to the numbers $S_{p,r}(d-1,k)$ being linearly independent over $\F_p$ for $k=0,\ldots,p-1.$

Finally, for completeness, (see Subsection \ref{historic}) we explain how formula (\ref{trace}) simplifies some known results.

We recall that Kurepa's conjecture (see \cite{kurepa}) is a long-standing conjecture 
(see also \cite{kurepa3, kurepa2, ivicmijaj, kohnen, mijaj, petoj, petojzizov, stanko, stankoz, carlitzK, dragovic,
 vladim, zoran, zsami, petojzizovcvej})
that states that
\begin{equation}
\label{mainkurepa}
K(p) := 0! + 1! + \cdots + (p-1)! \not \equiv 0 \pmod{p}
\end{equation}
for any odd prime number $p.$ Kurepa's conjecture may be stated with Bell numbers \cite[page 2]{barskyb1}, since
$K(p) =0 \iff B(p-1)=1$ in $\F_p.$  We are then able 
(see condition (r) in Theorem \ref{equivkurepa}) to present  a set of new formulae, that together are equivalent to
$K(p) =0$. 
One of them is
\begin{equation}
\label{altkurepa}
L(p) := \frac{1}{1 \cdot 1!} + \frac{1}{2 \cdot 2!} + \cdots + \frac{1}{(p-1) \cdot (p-1)!} \equiv 1 \pmod{p}.
\end{equation}

\subsection{Notations used in the paper}

\begin{itemize}
\item
We denote by $\sigma^{-1}(x) := x^{p^{p-1}}$ the inverse of the Frobenius $\sigma(x):=x^p$
in the Galois group of $\F_q$ over $\F_p.$ Observe that $\sigma(r)=r+1$ and $\sigma^{-1}(r)=r-1.$ 
As usual, for an integer $s \geq 0,$ ${\sigma^{-1}}^{(s)}(x)$ is defined by ${\sigma^{-1}}^{(0)}(x) :=\sigma^{-1}(x)$ and for $s>0,$
${\sigma^{-1}}^{(s)}(x) := \sigma^{-1}({\sigma^{-1}}^{(s-1)}(x)).$ The same holds also when ${\sigma^{-1}}$ is replaced by $\sigma.$
\item
\begin{definition}
\label{stirlingnewG}
We put for every
integer $n$ and every integer $k$
\begin{equation}
\label{stirlingnew}
S_{p,r}(n,k) = \epsilon(k)(r+k)^n
\end{equation}
\end{definition}
and
\begin{definition}
\label{betanewG}
We put for every
integer $n$
\begin{equation}
\label{betanew}
\beta(n) = \sum_{i=0}^{p-1} S_{p,r}(n,i).
\end{equation}
\end{definition}
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Some tools}

\begin{lemma}
\label{ypry}
The set of solutions of the equation $y^{p}=ry$ in $\F_q$
equals $\{k r^{c(p)} \mid k \in \F_p \}.$
\end{lemma}
\begin{proof}
See \cite[Lemme 3]{barskyb1}.
\end{proof}

\begin{lemma}
\label{nonzerocp} Let $C := \emph{ \textrm{Tr}}(y)$ where $y$ is any nonzero solution of the equation $y^p=ry$ in $\F_q.$
We put $A :=\emph{ \textrm{Tr}}(r^{c(p)})$ and $B := \emph{\textrm{Tr}}(r^{-c(p)}).$
Then
\begin{itemize}
\item[(a)]
$A$ and $B$ satisfy
$$
AB \equiv -1 \pmod{p}
$$
so that  they are both nonzero in $\F_p.$
\item[(b)]
$C$ is nonzero.
\end{itemize}
\end{lemma}

\begin{proof} The proof of  (a) follows from (\ref{trace}) and from $1 = B(1).$ By Lemma \ref{ypry}
$y = \lambda r^{c(p)}$ for some $\lambda \in \F_p.$ But $y$ and $r^{c(p)}$ are both nonzero so that $\lambda$ is nonzero.
By (a) $A$ is nonzero,
the result follows then from $C=\lambda A.$
\end{proof}

The following theorem explains the relation between zeros of Bell numbers modulo $p$,
and roots of some trinomials over $\F_p.$

\begin{theorem}
\label{cepe}
Given a prime number $p$, there exists a positive integer $n$ such that $B(n) \equiv 0 \pmod{p}$
if and only if  the trinomial $x^p -r x -r^n$ has a root $\gamma \in \F_{q}.$
\end{theorem}

\begin{proof}
By Lemma \ref{nonzerocp} $\textrm{Tr}(r^{c(p)}) \neq 0$ in $\F_p$ so that  (\ref{trace})
implies that the congruence is equivalent to $\textrm{Tr}(r^{-c(p)-n})=0$ in $\F_p.$
By the Additive Hilbert's Theorem $90$ 
this is equivalent to the existence of some $\lambda \in \F_{q}$ with $r^{-c(p)-n} = \lambda^p- \lambda.$ 
Observe that $r^{g(p)} =r(r+1) \cdots (r+p-1) = 1.$
Observe also that $c(p)=\frac{p^p -g(p)}{p-1}$.
Set $\gamma := r^{c(p)}\lambda$; since $c(p)(p-1) = g(p)(p-2)+1$ one sees that $r^{c(p)(p-1)}=r$ so that
$r^{c(p)p} = r^{1+c(p)}.$ This implies that
 $\lambda^p = r^{-c(p)-1} \gamma^p.$
Dividing by $r^{-c(p)}$ one gets $r^{-1}\gamma^p - \gamma = r^{n-1}.$  This proves the result.
\end{proof}

Here below the special case of \cite[Theorem 3]{rcoulter} that we need.

\begin{lemma}
\label{robresult}
Let $p$ be a prime number. Let $a,b$ be elements of $\F_{q}$ with $a \neq 0.$  Let $U(x) := x^p -ax -b \in \F_{q}[x].$
For $i=0,\ldots,p-2$ define $s_i :=\sum_{j=i}^{p-2} p^{j+1}$
and define $s_{p-1}:=0.$  Let $\alpha := a^{1+p+\cdots+p^{p-1}}$ and  $\beta := \sum_{i=0}^{p-1} a^{s_i}b^{p^i}.$  Then
the trinomial $U(x)$ has no roots in $\F_{q}$ if and only if $\alpha=1$ and  $\beta \neq 0.$ Moreover
$\beta^p =a \beta -b \alpha +b.$
\end{lemma}

\section{Proof of Theorem \ref{beta}}
By Theorem \ref{cepe} it suffices to determine when the trinomial $x^p-rx-r^{n}$ has a root in $\F_q.$
We apply Lemma \ref{robresult} with $a=r$ and $b=r^n$. 
We get $\alpha = r^{g(p)} = 1$ in $\F_{q}.$  This implies $\beta^p =r\beta.$ We claim that $\beta=\beta(n).$
In order to compute $\beta$ set $t_i := s_i + np^i$ for $i=0,\ldots,p-2$
and set $t_{p-1} := np^{p-1}.$ Since $r^{p^i}=r+i$ in $\F_{q}$ for any $i=1,\ldots, p-1$, we get $r^{t_{p-1}}=(r+p-1)^n$;
we have also $t_0 = p+ \cdots+p^{p-1}+n = g(p) +n-1$ so that $r^{t_0} =r^{n-1}$;
and $t_1 = p^2+ \cdots + p^{p-1} +np = g(p) +(n-1)p-1$ so that  
$r^{t_1} = \frac{(r+1)^{n-1}}{r}$.  Set $ \rho := r(r+1) \cdots (r+p-1).$ Since, $\rho = r^p-r =1,$
we get $r^{t_0}=r^{n-1}\rho =r^{n}\epsilon(0);$ analogously $r^{t_1}=r^{t_1}\rho = (r+1)^{n}\epsilon(1).$
If $p=3$ we are done. Assume then that $p>3.$
Now for all
$i=2,\ldots,p-2$ we have
$r^{t_i} = (r+i+1) \cdots (r+p-1)(r+i)^n = (r+i)^{n}\epsilon(i).$  Thus, $\beta=\beta(n).$
By Lemma \ref{robresult} this proves the result since $\alpha=1$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Some applications I}
\label{toformulae}

First of all we need two lemmas that require some definitions.

\begin{definition} Let $\alpha$ be an element of  $\F_q.$
\begin{itemize}
\item[(a)]We say that $\alpha$ has $\epsilon$-\emph{property} if either $\alpha=0$ or
$\alpha^{p-1} = \frac{1}{r}.$
\item[(b)]We say that $\alpha$ has $\delta$-\emph{property} if either $\alpha=0$ or
$\alpha^{p-1} = r.$
\end{itemize}
\end{definition}

\begin{lemma}
\label{Snonzero}
Let  $S := \sum_{i=0}^{p-1} \epsilon(i).$
Let $\epsilon \in \F_q$ be such that $\epsilon$ has $\epsilon-$property,
for example, $\epsilon =r^{-c(p)}.$ Then
$$
\emph{\textrm{Tr}}(\epsilon)=\epsilon S.
$$
In particular $\emph{\textrm{Tr}}(S)=-1$ so that $S \neq 0,$ and $S^p=Sr.$ Thus, $S$ has $\delta-$property.
\end{lemma}

\begin{proof} Since $\sigma(\epsilon)=\epsilon^p=\epsilon^{p-1}\epsilon = \epsilon/r$ we get $\sigma^{-1}(\epsilon) =\epsilon(r-1).$
It follows that ${\sigma^{-1}}^{(k)}(\epsilon) =\epsilon (r-1)(r-2) \cdots(r-k)$ for $k=1, \ldots,p-1.$ 
But $\textrm{Tr}(\epsilon)=\epsilon+\sum_{k=1}^{p-1}{\sigma^{-1}}^{(k)}(\epsilon).$
Thus, $\textrm{Tr}(\epsilon) = \epsilon + \epsilon(r+p-1)+\epsilon(r+p-1)(r+p-2) + \cdots+ 
\epsilon((r+p-1)(r+p-2)\cdots(r+p-(p-1))$
$=\epsilon S.$ Assume that $\epsilon \neq 0.$ 
Since $\epsilon$ has $\epsilon-$property, Lemma \ref{nonzerocp} implies that $\textrm{Tr}(\epsilon) \neq 0$ in $\F_p.$ 
Thus, $S=\textrm{Tr}(\epsilon)/\epsilon$ is nonzero.  With $\epsilon = r^{-c(p)}$
we have $\textrm{Tr}(S)=\textrm{Tr}(r^{-c(p)}) \textrm{Tr}(r^{c(p)}) = -B(0)=-1$
by (\ref{trace}).
Observe that $\epsilon S = \textrm{Tr}(\epsilon) = \textrm{Tr}(\epsilon)^p = \epsilon^pS^p$ so that
we get $S^p=rS.$ When $\epsilon =0$ the result is obvious.
\end{proof}

The proof of the following lemma is omitted since it is similar (just use $\sigma(x)$ instead of $\sigma^{-1}(x)$
in the argument) to the proof of Lemma \ref{Snonzero}.

\begin{lemma}
\label{Tnonzero}
Let  $T := \sum_{i=0}^{p-1}\delta(i).$
Let $\delta \in \F_q$ be such that  $\delta$ has $\delta-$property,
for example, $\delta =r^{c(p)}.$ Then
$$
\emph{\textrm{Tr}}(\delta)=\delta T.
$$
In particular $\emph{\textrm{Tr}}(T)=-1$ so that $T \neq 0,$ and $T^p=T/r.$ Thus, $T$ has $\epsilon-$property.
\end{lemma}

Now we give some details about the $\beta(n)$ (\ref{betanew})  defined in Theorem \ref{beta}.
The following theorem proves that these $\beta(n)$'s  are good generalizations of the Bell numbers
modulo $p$, to $\F_q.$

\begin{theorem}
\label{betatrace}
Let $n$ be any nonnegative integer. With the same notations as before we have
\begin{itemize}
\item[(a)] 
In $\F_q$,
$$
\beta(n+1) = \sum_{k=0}^{n} \binom{n}{k} \beta(k).
$$
\item[(b)]
In $\F_p,$
$$
\emph{\textrm{Tr}}(\beta(n)) = -B(n).  
$$
\end{itemize}
\end{theorem}

\begin{proof}
Set $b_n={\textrm{Tr}}(\beta(n)).$ We have $\beta(0) = \sum_{i=0}^{p-1} \epsilon(i) =S$ where $S$ is defined in Lemma 
\ref{Snonzero}. It follows from  Lemma \ref{Snonzero} that
${\textrm{Tr}}(\beta(0))= {\textrm{Tr}}(S) = -1=-B(0).$ Thus $b_0=-B(0).$
Assume then that $n>0.$ We compute now 
$\Theta := \sum_{k=0}^{n} \binom{n}{k} \beta(k).$ 
We have $\Theta = \sum_{k=0}^{n} \binom{n}{k} \sum_{i=0}^{p-1}(r+i)^k\epsilon(i) =$
$\sum_{i=0}^{p-1}  \sum_{k=0}^{n}\binom{n}{k}(r+i)^k 1^{n-k} \epsilon(i) =$
$\sum_{i=0}^{p-1} (r+i+1)^{n}\epsilon(i) = \sum_{i=0}^{p-1} (r+i+1)^{n+1}\epsilon(i+1),$
since $\epsilon(i)=(r+i+1)\epsilon(i+1).$ Put $j=i+1,$ to get 
$\Theta = \sum_{j=1}^{p} (r+j)^{n+1}\epsilon(j) = \beta(n+1)$ since $\epsilon(p)=\epsilon(0).$
Thus, $\beta(n+1) = \sum_{k=0}^{n} \binom{n}{k} \beta(k).$ This proves (a). Taking the trace in both
sides of (a) we get 
\begin{equation}
\label{bellsused}
b_{n+1} = \sum_{k=0}^{n} \binom{n}{k} b_{k}.
\end{equation} 
Set $R := -\sum_{k=0}^{n} \binom{n}{k} B(k).$
Observe that $b_0=-B(0).$ Assume that $b_k = -B(k)$ for all $k=1, \ldots,n.$ Then from \eqref{bellsused}
it follows that $b_{n+1} = R$, but by definition (see definition \ref{bells}) $R = -B(n+1)$ so that  $b_{n+1} = -B(n+1).$
This
proves that 
$b_n=-B(n)$ for all $n$, thereby finishing the proof of the theorem.
\end{proof}

We can then give a necessary and sufficient condition to solve the congruence $B(n) \equiv k$ for any integer $k$.

\begin{theorem}
\label{bellequalk}
Let $p>3$ be a prime number, and let $k$ be an integer. 
Then $B(n) \equiv k \pmod{p}$ has a positive integer solution $n$ if and only if $\beta(n) = k\beta(0)$. 
\end{theorem}

\begin{proof}
If $\beta(n) = k \beta(0)$ then it follows from Theorem \ref{betatrace} (b),
by taking the trace, that $B(n)=k$ in $\F_p.$ Assume now that $B(n)=k$ in $\F_p.$ By Theorem \ref{beta}
we have that $\beta(n)$ has $\delta-$property, and by Lemma \ref{Snonzero} we have that 
$\beta(0)$ has $\delta-$property.
By Lemma \ref{Tnonzero} we deduce that
$\textrm{Tr}(\beta(n))= \beta(n) T$ and that $\textrm{Tr}(\beta(0))= \beta(0) T.$  But, by Theorem \ref{betatrace}
(b) we have also $B(n) =- \textrm{Tr}(\beta(n))$ and $k=kB(0)=-k \textrm{Tr}(\beta(0)),$ with $T \neq 0.$
Thus, the result follows from
$$
\beta(n) T = k \beta(0) T.
$$
\end{proof}

\begin{remark}
\label{igor}
We know that $d$ is a divisor of $g(p)$ so that $d \leq g(p).$ We also know
that $B(n)$ modulo $p$ is periodic of minimal period $d.$ It follows that that the least positive integer $n$
with $B(n) \equiv k \pmod{p}$ satisfies $n  \leq d,$ so that $n$ is bounded above by a polynomial in $p$, namely
by $g(p). $ A big improvement of this simple upper bound is
in \cite{igorsh}, where it is proved 
that indeed $n < \frac{1}{2} \binom{2p}{p}.$  Moreover, in  \cite{voloch} 
it is proved that $2^{2.54p} < d$. Both results are non-trivial. In other words one has
$$
n <\frac{1}{2} \binom{2p}{p} <  2^{2.54p} < d.
$$
Furthermore, (see \cite[Lemma 1.1]{caretal})  $d \equiv 1 \pmod{2p}$ and $d \equiv 1 \pmod{4p}$ when $p \equiv 3 \pmod{4}$
since $d$ is a divisor of $g(p).$
\end{remark}

Now we show that the traces of the additive components of $\beta(n)$, namely the terms 
$\textrm{Tr}((r+i)^n \epsilon(i))$,
satisfy the same recurrence that the Stirling numbers of the second kind.
\begin{theorem}
\label{stirling2k}
Let $p>3$ be a prime number, and let $n,k$ be nonnegative integers.
Recall that by definition \ref{epsilons} $\epsilon(k) := \epsilon(k \pmod{p}).$
Set $T(n,k) := \emph{ \textrm{Tr}}(S_{p,r}(n,k)) = \emph{ \textrm{Tr}}((r+k)^n \epsilon(k)).$
Then
$$
T(n+1,k) = k T(n,k) + T(n,k-1).
$$
\end{theorem}

\begin{proof}
$$
k T(n,k) + T(n,k-1) 
$$
$$
= k   \textrm{Tr}((r+k)^n \epsilon(k)) +   \textrm{Tr}((r+k-1)^n \epsilon(k-1))
$$
$$
= \textrm{Tr}(k(r+k)^n \epsilon(k)) +  \textrm{Tr}(\sigma((r+k-1)^n \epsilon(k-1)))
$$
$$
= \textrm{Tr}(k(r+k)^n \epsilon(k) + (r+k)^n r \epsilon(k)) 
$$
$$
=  \textrm{Tr}((r+k)^{n+1} \epsilon(k)) = T(n+1,k).
$$
\end{proof}

\begin{remark}
\label{initnewStirl}
The initial conditions satisfied by the $T(n,k)$ differ from those of the Stirling numbers $S(n,k)$ of the second kind
modulo $p$, namely
one has $T(0,0) =\textrm{Tr}(1/r)=-1$, instead of $S(0,0)=0.$ Moreover, $T(n,0)=\textrm{Tr}(r^{n-1})$ that depends on $n$
and it is difficult to compute for general $n,$ while $S(n,0)=0;$ also $T(0,n) = \textrm{Tr}(\epsilon(n)) = -1$
if $n \equiv 0 \pmod{p}$ and $T(0,n)=0$ otherwise,
while $S(0,n)=0$ for all $n.$
\end{remark}

Now we show that $B(n)$ and $\beta(n)$ differ only by  a fixed nonzero  element of $\F_q.$

\begin{corollary}
\label{betaasbell}
\begin{itemize}
\item[(a)]
$\beta(n) = -(1/T) B(n)$
\item[(b)]
$\beta(n) =  \emph{ \textrm{Tr}}(r^{n-c(p)-1})r^{c(p)}.$
\item[(c)]
Let $d$ be any period of the sequence $(B(n)).$ Then $d$ is also a period of the sequence $(\beta(n))$.
More precisely, we have for all integers $n$
$$
\beta(n+d)=\beta(n).
$$
\end{itemize}
\end{corollary}

\begin{proof}
By Theorem \ref{beta} $\beta(n)$ has $\delta-$property so that we may apply Lemma \ref{Tnonzero} to get
$\textrm{Tr}(\beta(n)) = \beta(n)T$ and also $T \neq 0.$ 
Now from Theorem \ref{betatrace} (b) we get $\textrm{Tr}(\beta(n))=-B(n).$
Combining both results we get (a). Since $\beta(n)$ and $r^{c(p)}$ are both solutions of the equation
$y^p=ry$ in $\F_q$, by Lemma \ref{ypry} one has $\beta(n) = c r^{c(p)}$ for some $c \in \F_p.$ But, by
Theorem \ref{betatrace} (b) $-B(n) = \textrm{Tr}(\beta(n)) = c  \textrm{Tr}(r^{c(p)});$ and by (\ref{trace})
$B(n) =- \textrm{Tr}(r^{c(p)}) \textrm{Tr}(r^{n -c(p)-1}),$ so that $c = Tr(r^{n-c(p)-1}).$ This proves (b). 
The latter assertion (c) follows from(a).

\end{proof}

This has the following non-trivial consequence:

\begin{remark}
We have in $\F_p$, for any odd prime number $p$ and any nonnegative integer $n.$
\label{both}
$$
B(n) = 0  \iff \beta(n)=0.
$$
\end{remark}

\begin{proof}
Just apply part (a) of Corollary \ref{betaasbell} above. The condition $T \neq 0$ is satisfied by Lemma \ref{Tnonzero}.
\end{proof}

The corollary implies that $\beta(n)$ satisfies the same relations that $B(n).$ More precisely,
(see Corollary \ref{formulasbell} below),
a) generalizes Touchard's Congruence in Lemma \ref{touchardlemma},
(b) generalizes \cite{kahale}, Formula (6),
(c) generalizes \cite{kahale}, Formula (5),
(d) generalizes \cite{kahale}, Formula (4), and
(e) generalizes \cite{kahale}, Formula (10).

See also \cite{radoux}). The formulae below also follow directly from the definition of $\beta(n).$

\begin{corollary} For all nonnegative integers $n,q$ we have
\label{formulasbell}
\begin{itemize}
\item[(a)]
$\beta(n+p)=\beta(n)+\beta(n+1),$
\item[(b)]
$\beta(n +p^m) = m\beta(n) +\beta(n+1),$
\item[(c)]
$\beta((n-1)p) = \beta(n),$
\item[(d)]
$\beta(n+kp) = \sum_{i=0}^{k} \binom{k}{i} \beta(n+i),$
\item[(e)]
$\beta(np^q+p^q) = q\beta(np^q)+\beta(np^{q+1}).$
\end{itemize}
\end{corollary}

In order to compute the norm of $\beta(n)$ we need

\begin{lemma}
\label{deltasepsilons}
One has in $\F_q$
\begin{itemize}
\item[(a)]
$1 = \prod_{i=0}^{p-1} \delta(i) \epsilon(i).$
\item[(b)]
$\prod_{i=0}^{p-2} \delta(i) = r^{-c(p)-1}.$
\end{itemize}
\end{lemma}

\begin{proof}
From Definition  \ref{epsilons} every term in the product is actually equal to $1$
since $\delta(i)\epsilon(i) = r^p-r=1.$ This proves (a). Observe
that $r^{c(p)} = r(r+1)^2(r+2)^3 \cdots (r+p-2)^{p-1}.$ Let $M=(M_{i,j})$ be the $p$ by $p$ matrix with  
with $p$ equal lines $[r,r+1,r+2, \ldots,r+p-1].$  Namely,

\begin{equation}
\label{leM}
M :=
\begin{bmatrix}
r & r+1 & r+2 & \cdots & r+p-2 & r+p-1\\
r & r+1 & r+2 & \cdots & r+p-2 & r+p-1\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\
r & r+1 & r+2 & \cdots & r+p-2 & r+p-1\\
r & r+1 & r+2 & \cdots & r+p-2 & r+p-1 
\end{bmatrix}.
\end{equation}

Consider the product $\pi$ of all $p^p$ entries of $M.$
By (a), $\pi=1.$ On the other hand, puttting $\alpha = \prod_{i=0}^{p-2} \delta(i)$ and $\gamma = r^{c(p)}(r+p-1)^p$
one sees that $\alpha$ is the product of all entries in the lower triangular part of $M$ without the last row and the last column.
But, $\delta(p-1)=r(r+1) \cdots(r+p-1) =1$ is the product of all entries in the last row of $M.$, 
so $\alpha$ is equal to the product of all entries in the lower triangular part of $M$, i.e., $\alpha= \prod_{i \geq j} M_{i,j}$
Similarly, one sees also that $\gamma$ is the product of all entries in the upper triangular part of $M$, i.e.,
$\gamma= \prod_{i \leq j} M_{i,j}.$ 
Since only diagonal entries in $M$ overlap, and the product of all diagonal entries of  $M$ is equal to $N(r)=1,$ one has
\begin{equation}
\label{pde}
1 =\pi = \alpha \gamma
\end{equation}
But the product of the elements in the last column of $M$
equals $(r+p-1)^p = \sigma(r+p-1)=r,$  so that
$$
\gamma = r^{c(p)+1}.
$$
Thus, from \ref{pde} it follows $\prod_{i=0}^{p-2} \delta(i) = r^{-c(p)-1}$ that proves (b).
\end{proof}

The following result of Kahale \cite[formula (3)]{kahale} is useful, (see also \cite{radoux2}).
\begin{lemma}
\label{kahaleBc}
let $p$ be an odd prime number. One has
$B(c(p)) = (-1)^{\frac{(p-1)(p-3)}{8}}  \left (\frac{p-1}{2} \right )!$
in $\F_p.$
\end{lemma}

\begin{theorem}
\label{normofbeta}
Let $p>2$ be a prime number. Let $n$ be a nonnegative integer. Then
\begin{itemize}
\item[(a)]
$$
N(\beta(n)) = \beta(n) r^{-c(p)}.
$$
\item[(b)]
$$
N(\beta(n)) =\frac{ (-1)^{\frac{(p+1)(p-5)}{8}}}{ \left (\frac{p-1}{2} \right )!} B(n).
$$
\end{itemize}
\end{theorem}

\begin{proof}
Since, by Theorem \ref{trace}, $\sigma(\beta(n)) =r\beta(n)$ we have by induction 
$\sigma^{(k)}(\beta(n)) = r(r+1) \cdots (r+k-1)\beta(n)$ = $\delta(k-1)\beta(n),$
so that $N(\beta(n)) = \beta(n)^p \prod_{k=0}^{p-1}\delta(k).$ But $\delta(p-1)=1$ and $\beta(n)^p = r\beta(n),$
so by Lemma \ref{deltasepsilons} (b)
we get $N(\beta(n)) = \beta(n)r r^{-c(p)-1} = \beta(n) r^{-c(p)}.$ This proves (a). From (a) and Corollary
\ref{betaasbell} (b) we have $N(\beta(n)) =  \textrm{Tr}(r^{n-c(p)-1}).$ From (\ref{trace})
we deduce that $N(\beta(n)) = -B(n) /\textrm{Tr}(r^{c(p)}).$
From (\ref{trace}) with $n=c(p)$ we get  $\textrm{Tr}(r^{c(p)}) = B(c(p))$ since $\textrm{Tr}(r^{-1})=-1.$
Thus $N(\beta(n)) = -\frac{B(n)}{B(c(p))}.$ Observing that $-B(c(p)) = (-1)^{-1}B(c(p)),$
the result (b) follows then from  Lemma \ref{kahaleBc}.
\end{proof}

\section{Some applications II}
\label{tokurepa}

\subsection{Related to derangement numbers}
\label{derangement}

We recall that the derangement number  $D(n)$ may be defined by  $D(0)=1$ and $D(n)=nD(n-1)+(-1)^n$
for any positive integer $n.$  An explicit formula that holds for any nonnegative integer $n$
 is
\begin{equation}
\label{derangementx} 
D(n) = n! \sum_{k=0}^n \frac{(-1)^k}{k!}.
\end{equation}
The main result of Sun and Zagier
 \cite[Theorem 1]{sunzagier} is that for any positive
 integer $m$ not multiple of a prime number $p$ one has in $\F_p$
\begin{equation}
\label{sunzag}
(-1)^{m-1}D(m-1) = \sum_{k=1}^{p-1} \frac{B(k)}{(-m)^k}.
\end{equation}
We will extend this formula to $\F_q$ in such a manner that is also valid for any $m.$
The $\Delta$ below should play the role, in $\F_q$, of the derangement number, modulo $p.$
\begin{definition}
\label{delt}
For any nonnegative integer $m$ let
$$
\Delta(m-1) := \sum_{i=0}^{p-1} \frac{\epsilon(i)}{r+i+m}.
$$
\end{definition}


\begin{theorem}
\label{extendsz}
For any nonnegative integer $m$ one has
\begin{itemize}
\item[(a)] 
If $m =ps,$ for a nonnegative integer $s,$ we have
$\Delta(m-1) = \beta(d-1)$, where $d$ is any period of $B(n).$
\item[(b)]
$\Delta(m-1) = \sum_{k=0}^{p-1}(-m)^k \beta(p-1-k) - \beta(0).$
\item[(c)]
When $p \nmid m$ we have
$\Delta(m-1) = \sum_{k=1}^{p-1} \frac{\beta(k)}{(-m)^k}.$
\item[(d)]
$$
\emph{ \textrm{Tr}}(\Delta(m-1)) = (-1)^{m}D(m-1).
$$
\item[(e)]
$1+ (-1)^{m-1}D(m-1) = \sum_{k=0}^{p-1}(-m)^k B(p-1-k)$, in $\F_p.$
\item[(f)]
When  $p \nmid m$ we recover (\ref{sunzag}), by taking traces in both sides of (c).
\item[(g)]
$1+(-1)^{ps-1}D(ps-1) = B(p-1)$ in $\F_p$. In particular we have $1+D(p-1)=B(p-1).$
\item[(h)]
$(-1)^{m-1}D(m-1) = -\emph{ \textrm{Tr}}(r^{c(p)})\emph{ \textrm{Tr}}(\frac{1}{r+m}r^{-c(p)-1}).$
\end{itemize}
\end{theorem}

\begin{proof}
From Definition \ref{delt} with $m=ps$  we have
$$
\Delta(m-1)= \sum_{k=0}^{p-1} \epsilon(k)(r+k)^{-1} = \beta(-1).
$$
But $\beta$ is periodic of period $d$ so that it follows from Corollary \ref{betaasbell} (c) with $n=-1$ that
$$
\Delta(m-1)= \beta(d-1).
$$
This proves (a). 
Set $\rho(m)$ the right hand side of (b). 
We have 
$$
\rho(m)=\sum_{i=0}^{p-1}\left ( \sum_{k=0}^{p-1} (-1)^km^k(r+i)^{p-1-k} \right ) \epsilon(i) - \sum_{i=0}^{p-1}\epsilon(i).
$$
But $(-1)^k = \binom{p-1}{k}$ in $\F_p,$  and   $(r+i+m)^{p-1} - 1 = \frac{1}{r+i+m}.$
So, 
$$
\rho(m) = \sum_{i=0}^{p-1} ((r+i+m)^{p-1}-1)\epsilon(i) = \Delta(m-1).
$$
This proves (b). Set $\psi(m)$ the right hand side of (c). We have
$$
\psi(m) =\sum_{i=0}^{p-1}\epsilon(i)(a+a^2+ \cdots +a^{p-1})
$$
where $a=\frac{r+i}{-m}.$
Since
$$
1+a+a^2+ \cdots +a^{p-1} =\frac{a^p-1}{a-1}
$$
we get
by using $(r+i)^p = r+i+1$ and $(-m)^p =-m$  the formula
$$
\psi(m) =\sum_{i=0}^{p-1}\epsilon(i) \left (\frac{r+i+1+m}{r+i+m}-1 \right) = \Delta(m-1).
$$ This proves (c).
Observe that by Theorem \ref{betatrace} (b) one has $\textrm{Tr}(\beta(k)) = -B(k)$ for all $k=1, \dots,p-1.$
Assume that $p \nmid m.$
By taking the trace in both sides of (c) and by using (\ref{sunzag}) multiplied in both sides by $-1$,
in other words, the sign $(-1)^{m-1}$ in formula (\ref{sunzag}) is transformed in a sign $(-1)^m$,
we get then (d).
If $p \mid m$ then by (a) we get 
$\Delta(m-1)=\beta(d-1)$ where $d$ is any period of $B(n).$ From (b) we get $\Delta(m-1)=\beta(p-1)- \beta(0).$
So, proceeding as before, i.e., by taking traces, we see that (d) is equivalent to $B(d-1)=B(p-1)-1.$ 
But this holds by Touchard's congruence  Lemma \ref{touchardlemma}
with $n=d-1.$ This proves (d). In order to prove (e) take traces in both sides of (b), by using again
$\textrm{Tr}(\beta(k)) = -B(k)$ and $B(0)=1$. This together with (d) proves (e). The same argument proves (f). 
Substitute $m=ps$ in both sides of (e). This proves (g).  
In order to prove (h), observe that by (\ref{trace}) one has $B(p-1-k) =- \textrm{Tr}(r^{c(p)})\textrm{Tr}(r^{p-1-k-c(p)-1}).$
Set $\mu(m)=(-1)^{m-1}D(m-1)  \textrm{Tr}(r^{c(p)})^{-1}.$
So, by (e) one has
$$
\mu(m) = -\left( \sum_{k=0}^{p-1} (-1)^k m^k \textrm{Tr}(r^{p-1-k} \cdot r^{-c(p)-1})\right)
$$
but $(-1)^k = \binom{p-1}{k}$ in $\F_p$ so
$$
\mu(m) =- \textrm{Tr}\left(r^{-c(p)-1}\left(\sum_{k=0}^{p-1} 
\binom{p-1}{k}m^k r^{p-1-k} -1 \right)\right) 
$$
$$
= -\textrm{Tr}\left(r^{-c(p)-1}\left((r+m)^{p-1}-1 \right) \right) = -\textrm{Tr}\left(r^{-c(p)-1}\frac{1}{r+m} \right) .
$$
This proves (h).
\end{proof}

\begin{corollary}
\label{periodD}
The minimal period of $D(m)$ modulo $p$ is $2p.$ I.e., for all $m$ one has $D(m+2p) = D(m)$ in
$\F_p$ and $D(m+h)=D(m)$, in $\F_p,$ for all $m$ implies $h \geq 2p.$
\end{corollary}

\begin{proof}
By changing $m$ by $m+p$ in Theorem \ref{extendsz} (h) we get 
\begin{equation}
\label{minusD}
-D(m+p-1)=D(m-1)
\end{equation}
 in $\F_p.$
Repeating the change we get $D(m-1+2p)=D(m-1).$ Since the minimal period $h$ divides $2p$, it is unequal
to $1$ or $2$ and  $h \neq p$ by  (\ref{minusD}), it follows that $h=2p.$
\end{proof}

\subsection{Related to Kurepa's conjecture}
\label{kurepa}

We can retrieve the most basic relation between Bell numbers and Kurepa's conjecture as follows.
All computations are in $\F_p.$ A precise relation is
$B(d-1)=K(p)$ (see Proposition \ref{betaka}). Moreover,
from Theorem \ref{extendsz} (a) and (d)  $D(p-1)=B(d-1)$ for any period $d$ of $B(n).$ So $K(p)=0 \iff D(p-1)=0.$
Alternatively, we may obtain the same result
observing that $K(p)=0 \iff B(p-1)=1$
by Theorem \ref{extendsz} (g).  This, together with (\ref{derangementx}), gives us the explicit equivalence 
(that can be checked also directly using the Bouniakowsky formula
$(k-1)! (p-k)! = (-1)^k$ in $\F_p$).
\begin{equation}
\label{equiv1}
\sum_{k=0}^{p-1} k! = 0  \iff \sum_{k=0}^{p-1} \frac{(-1)^k}{k!} = 0.
\end{equation}

Observe that $K(p)=\det(G(p))$ as seen by developing by the last line the determinant where
$G(p) = (g_{i,j})$ is a $(p-1) \times (p-1)$ matrix defined by $g_{1,1}=-2,$ $g_{i,i}=-1$ for $i \neq 1,$
$g_{i,i+1}=i+1,$ $g_{i,1}=-1$ for $i \neq 1,$ and $g_{i,j}=0$ for all other $i,j$, namely
\begin{equation}
\label{detkp}
G(p) :=
\begin{bmatrix}
-2 & 2 & 0 & \cdots & \cdots &\cdots & 0\\
-1 & -1 & 3 & 0 & \cdots & \cdots & 0\\
-1 & 0 & -1 & 4 & 0 & \cdots & 0 \\
\vdots & \vdots & \ddots & \ddots & \ddots & \ddots & \vdots \\
\vdots & \vdots &  & \ddots & \ddots & \ddots & 0 \\
-1 & 0 & \cdots & \cdots & 0 & -1 & p-1 \\
-1 & 0 & \cdots & \cdots & \cdots & 0 & -1 
\end{bmatrix}.
\end{equation}
It is not difficult to see that the columns $2$ to $p-1$ are $\F_p$-linear independent so that $rank(G(p)) \in \{p-2,p-1\}.$
Thus $K(p)=0$ is equivalent to the first column $C_1 = \sum_{j=2}^{p-1} x_jC_j$ beeing an $\F_p$-linear combination of the
other columns. This leads to the recurrence $x_{n-1} = nx_{n}+1$ in $\F_p$ so that
\begin{equation}
\label{sequence}
K(p)=0 \iff ( x_{p-1}=1 \Longrightarrow x_2 =-1).
\end{equation}

The few first terms are:  $x_{p-1}=1, x_{p-2}=0, x_{p-3}=1, x_{p-4}=-2, x_{p-5}=9, x_{p-6}=-44, x_{p-7}=265, x_{p-8}=-1854,
x_{p-9}=14833;$ see also \cite{petoj}.

Another simple equivalence consists of using $B(p-1)=1$ in $\F_p$, the double sum (\ref{pitman})
that holds over the integers $\Z$
(see \cite[formula (21)]{pitmanj})

\begin{equation}
\label{pitman}
B(n) = \sum_{k=1}^{n} \sum_{i=0}^{n-k} \frac{(-1)^{i}k^n}{k! i!},
\end{equation}
and (\ref{equiv1}) to get in $\F_p$

\begin{equation}
\label{equiv1a}
\sum_{k=0}^{p-1} k! = 0  \iff \sum_{k=3}^{p-3} \sum_{i=0}^{p-1-k} \frac{(-1)^{i}}{k! i!}= 0.
\end{equation}

Using again the fact:  $K(p)=0 \iff B(p-1)=1,$ and  \cite[Proposition 3.1]{saikiasub} we get 
\begin{equation}
\label{detform}
\sum_{k=0}^{p-1} k! = 0  \iff \det(A(p))=1,
\end{equation}
where the $(p-2) \times (p-2)$ matrix $A(p) = (a_{i,j})$ is defined by $a_{i,i}=2$, $a_{i+1,i}=1,$
$a_{i,j}=0$ for $i>j+1,$ and $a_{i,j} = (-1)^{i+j} \binom{j-1}{i-1}$ for $j>i$, namely

\begin{equation*}
A(p) =
\begin{bmatrix}
2 & -1 & 1 & -1 & \cdots & (-1)^{p-3}\\
1 & 2 & -\binom{2}{1} & \binom{3}{1} & \cdots & (-1)^{p-4} \binom{p-3}{1}\\
0 & 1 & 2 & -\binom{3}{2} & \cdots & (-1)^{p-5} \binom{p-3}{2} \\
0 & 0 & 1 & 2 & \cdots & \cdot \\
0 & 0 & 0 & 1 & \cdots & \cdot \\
\vdots & \vdots & \vdots & \vdots & \cdots & -\binom{p-3}{p-4} \\
0 & 0 & 0 & 0 & \cdots & 2
\end{bmatrix}
\end{equation*}


Below, several other equivalences. 

\begin{theorem}
\label{equivkurepa}
Each of the conditions below is equivalent to the condition $K(p) = 0$ in $\F_p.$
\begin{itemize}
\item[(a)]
$\beta(d-1)=0.$
\item[(b)]
$\beta(p-1)= \beta(0).$
\item[(c)]
$\emph{\textrm{Tr}}(r^{-c(p)-2}) =0.$
\item[(d)]
The vector $s \in \F_q$ defined  by $s^2 = r^{-c(p)-2}$ is an isotropic vector of the
quadratic form $Q(x) = \emph{\textrm{Tr}}(x^2).$
\item[(e)]
$B(d-2p+2)+2B(d-2p+1)=1.$
\item[(f)]
$\emph{\textrm{Tr}}\left(r^{-c(p)-1}\frac{1}{(r+1)^2}\right) =0.$
\item[(g)]
$\emph{\textrm{Tr}}(\beta(d-1)r) =0.$
\item[(h)]
$\emph{\textrm{Tr}}\left(\frac{\epsilon}{r-1}\right) =0 = B(2)+ \cdots +B(p),$
where $\epsilon \in \F_q$ is defined by $r \sigma(\epsilon) = \epsilon.$
\item[(i)]
$\emph{\textrm{Tr}}\left(\frac{\epsilon}{r^2}\right) =0$ for the same $\epsilon$ of (h).
\item[(j)]
$D(p-2)=1.$
\item[(k)]
$D(d-2)=0.$
\item[(l)]
$B(0)+B(1)+ \cdots + B(p-1)=0.$
\item[(m)]
$\emph{\textrm{Tr}}\left(r^{-c(p)-2} \frac{r^2}{r-1}\right) =0.$
\item[(n)]
$\emph{\textrm{Tr}}\left(r^{-c(p)-2} \frac{1}{r-1}\right) = (-1) \cdot \frac{1}{B(c(p))}.$
\item[(o)]
$B(0)+B(2) + \cdots +B(p-1)=1$ and $B(1)+B(3) + \cdots + B(p-2)=-1.$
\item[(p)]
$\sum_{m=0}^{p-3} (-1)^{m}D(m) = 0.$
\item[(q)]
The vector space $V(p),$ over $\F_p,$ generated by the vectors 
$$\{S_{p,r}(d-1,k), k=0,\cdots, p-1 \}
$$
has dimension less than $p.$
\item[(r)] 
In $\F_p$ one has $\beta_0 = \cdots = \beta_{p-2}=0$ where
$$
\beta_0 := \sum_{k=1}^{p-1} \frac{1}{k \cdot k!} -1,
$$
$$
\beta_1 := \sum_{k=1}^{p-2} \frac{(-1)^k}{k \cdot (k+1)!} +2,
$$
$$
\beta_2 := \sum_{k=1}^{p-3} \frac{(-1)^{k+1}}{k \cdot (k+2)!} -\frac{3}{2},
$$
and for $j=3, \ldots, p-2$
\begin{equation}
\label{generalj}
\beta_j := \sum_{k=0}^{p-1} A_{k,j} + s_j(k) B_{k,k} F_{k,j},
\end{equation}
where $F_{k,j}$ are some elements in $\F_p,$, 
$s_j(k) :=  -1$ when $k=j$ and $s_j(k) := 1$ otherwise; and
where for $0 \leq j \leq i-1$
$$
A_{i,j} := \frac{(-1)^j}{j! (i-j)! (i-j)},
$$
for $j>i$ we have $A_{i,j}=0,$ and
$$
A_{i,i} :=(-1) \sum_{j=0}^{i-1} A_{i,j},
$$
while for all $i$
$$
B_{i,i} := \frac{(-1)^i}{i!}.
$$
\end{itemize}
\end{theorem}

In order to prove the theorem, we present some useful lemmas; some of them may have
an interest in their own.

First of all we recall the definition of the trace that is useful in several computations below.

\begin{remark}
\label{deftrace}
Let $K$ be a field that is a Galois extension of the field $k$ with Galois group $G(K/k).$ Let $a \in K.$ Then
$$
\textrm{Tr}(a) =\sum_{\sigma \in G(K/k)} \sigma(a).
$$
Then we have:
\begin{itemize}
\item[(a)]
If the degree $d := [K:k]$ of the extension $K$ over $k$, is a multiple of the characteristic $p>0$ of $k$
and $a \in k$ is an element of $k$,
then since $\sigma(a)=a$ for all $\sigma \in G(K/k)$ we have:
$$
\textrm{Tr}(a)  = a + a  + \cdots +a = d \cdot a = 0.
$$
In particular this works when $a=1,$ namely:
$$
\textrm{Tr}(1)  = 0.
$$
However, if the extension is the trivial extension, i.e. $K=k$ so that $G(K/k)=G(k/k)= \{id \}$ so that $d=1$, one has instead
for any $a \in k$:
\item[(b)]
$$
\textrm{Tr}(a)  = id(a) = a.
$$
In particular this gives for the trivial extension $k/k$ and for $1 \in k$:
$$
\textrm{Tr}(1)  = 1.
$$
\end{itemize}
We will use the fields $k=\F_p$ and $K=\F_q$ where $q=p^p$ and $p$ is an odd prime number, and the trace
$\textrm{Tr}(a)$ defined above,
in all computations below.
\end{remark}


Our first two lemmas are well known but they are key to prove the next important proposition (see Proposition \ref{betaka} below)
that links the generalized Bell number $\beta(d-1)$ in $\F_q$ with the classical left-factorial sum $K(p)$ in  $\F_p.$

\begin{lemma}
\label{traceqp}
The trace 
$\emph{\textrm{Tr}}: \F_q \to \F_p$  restricted to $\F_p$ is the zero function.
\end{lemma}

\begin{proof}
Let $a \in \F_p  \subseteq \F_q$.  Since $\textrm{Tr}(a)=a\textrm{Tr}(1)$ it suffices to prove that $\textrm{Tr}(1)=0.$
But $\textrm{Tr}(1) = 1+\sigma(1)+ \cdots + \sigma^{(p-1)}(1) = 1 + \cdots + 1 = p \cdot 1 =0.$ Thus $\textrm{Tr}(a)=0$
thereby proving the lemma.
\end{proof}


\begin{remark}
\label{tracepp}
However, if $tr: \F_p \to \F_p$ denotes the trace, one has $tr(1) \neq 0$
since the Galois group $G$ of the extension field
$\F_p$ over itself, i.e., over $\F_p$ is reduced to the identity function $id: x \to x$, i.e., $G = \{id\}$ so that
$$
tr(1) = id(1)=1.
$$
\end{remark}

\begin{lemma}
\label{traceofs}
\begin{itemize}
\item[(a)]
The trace of any root of the polynomial $T_p(x) := x^p-x-1$ is equal to $0.$
In other words we have
$$
\emph{\textrm{Tr}}(r) = 0,
$$
\item[(b)]
$$
\emph{\textrm{Tr}}(\frac{1}{r}) = -1.
$$
\end{itemize}
\end{lemma}

\begin{proof}
Observe that $\textrm{Tr}(r)$ is the coefficients of $x^{p-1}$ in the polynomial $T_p(x).$ This proves (a).
The minimal polynomial of $\frac{1}{r}$ is $U_p(x)=x^p+x^{p-1}-1 = -x^pT_p(1/x)$ the reciprocal polynomial of $T_p(x)$
multiplied by $-1$. As before $\textrm{Tr}(\frac{1}{r})$ is the coefficient of $x^{p-1}$ in $U_p(x)$. This proves (b).
\end{proof}


\begin{proposition}
\label{betaka} We have
$$
 \emph{\textrm{Tr}}(\beta(d-1)) = -K(p).
$$ 
\end{proposition}

\begin{proof}
Observe that $v_k := \epsilon(k)(r+k)^{-1} =\frac{(r+k+1) \cdots (r+p-1)}{r+k}$ for all $k=0,\ldots,p-1$
and that $\beta(d-1)= \sum_{k=0}^{p-1} v_k.$ With the change of variable
$s=r+p-k$
the trace becomes
$$
\textrm{Tr}(v_{p-k})=\textrm{Tr}\left(\frac{(s+1)(s+2)\cdots(s+k)}{s}\right) = -k!
$$
since $\textrm{Tr}(s^h)= \textrm{Tr}(1) =1$ for $h=0,$ (see Lemma \ref{traceqp}),
$\textrm{Tr}(s^h)=0$ for $h=1,\ldots,p-2$,  and $\textrm{Tr}(s^{-1})=-1$
(see Lemma \ref{traceofs} part (b)).
\end{proof}

The following lemma is a special case of \cite[Corollary 2.38]{niederreiter}.
\begin{lemma}
\label{independent1}
Let $v_1, \ldots, v_p \in \F_q.$ Then $\{v_1, \ldots, v_p\}$ is a basis of $\F_q$ over $\F_p$ if and only if
$\det(V) \neq 0$ where $V$ is the following $p \times p$ matrix:
\begin{equation*}
V =
\begin{bmatrix}
v_1 & v_2  & \cdots & v_p\\
\sigma(v_1) & \sigma(v_2)  & \cdots & \sigma(v_p)\\
\vdots & \vdots  &  & \vdots \\
\sigma^{(p-1)}(v_1)  & \sigma^{(p-1)}(v_2) & \cdots & \sigma^{(p-1)}(v_p)
\end{bmatrix}
\end{equation*}
\end{lemma}

\begin{definition}
\label{circulantsG}
The circulant matrix $C$ with first row $c_1, \ldots,c_n$, namely
\begin{equation*}
C =
\begin{bmatrix}
c_1 & c_2  & \cdots & c_n\\
c_n & c_1  & \cdots & c_{n-1}\\
\vdots & \vdots  &  & \vdots \\
c_2  &  c_3  & \cdots & c_1
\end{bmatrix}
\end{equation*}
is denoted $circ(c_1, \ldots,c_n).$
\end{definition}

The following is \cite[Proposition 10, page A VII. 36]{bourbaki}.
\begin{lemma}
\label{bourbakiVP}
Let $E$ be a vectorial space of finite dimension $n$ over a commutative field $K.$
Let $u$ be an endomorphism of $E.$ Let $char_u(x) = \prod_{i=1}^n (x - \alpha_i)$ be a 
decomposition in linear factors over a suitable extension field of $K$ of the characteristic polynomial of $u.$
Let $q(x)$ be a polynomial with coefficients in $K$. Then
\begin{itemize}
\item[(a)]
The characteristic polynomial of $q(u)$ is
$$
char_{q(u)}(x) = \prod_{i=1}^n (x - q(\alpha_i)).
$$
\item[(b)]
Its trace is
$$
\emph{ \textrm{Tr}}(q(u)) = \sum_{i=1}^n q(\alpha_i).
$$
\item[(c)]
Its determinant is
$$
det(q(u)) = \prod_{i=1}^n q(\alpha_i).
$$
\end{itemize}
\end{lemma}


The following lemma computes the determinant of a $p$ by $p$ circulant $C$ over $\F_q.$
The formula obtained is the same that in the case of a $n$ by $n$ circulant with $\gcd(n,p)=1,$
but we require a special proof since $C$ is not necessarily diagonalizable. 
This was first observed by Ore \cite[Theorem 7]{ore},
three more proofs are in Silva \cite[Theorem 1]{silva}, Brenner \cite[Theorem 1]{brenner}, and
Lehmer \cite[Theorem 1]{lehmer}. 
For completeness we provide a short proof based
in Lemma \ref{bourbakiVP}.

\begin{lemma}
\label{detpp}
Let $v_1, \ldots, v_p \in \F_q.$
Let  $V = circ(v_1, \ldots, v_p).$
Then
$$
\det(V) = (v_1+ \cdots + v_p)^p.
$$
\end{lemma}

\begin{proof}
Let $\pi = circ(0,1,0,\ldots,0)$ be the $p$ by $p$  circulant that generates polynomially all $p$ by $p$ circulants.
Clearly $char_{\pi}(x) = x^p -1 = (x-1)^p$ is the characteristic polynomial of $\pi.$  Observe that $V = R(\pi)$
where $R(x) = v_1+v_2x+ \cdots + v_{p}x^{p-1}$ is the representer polynomial of $V.$
Thus, by Lemma \ref{bourbakiVP} $\det(V) = \det(R(\pi)) = R(1)^p.$
But $R(1)= v_1 + \cdots + v_p.$ The result follows.
\end{proof}

Taking now the $v_i$'s as our generalization of the Stirling numbers modulo $p$ we get.

\begin{theorem}
\label{stirlingbasis}
Let $n$ be an integer and $k \in \{1,\ldots,p\}.$
Take $v_k := S_{p,r}(n,k).$ Then
the vector space $V(p),$ over $\F_p,$ generated by the vectors 
$$
\{v_1,\ldots, v_p\}
$$
has dimension less than $p$ if and only if
$$
\beta(n) =0.
$$
\end{theorem}

\begin{proof}
We see that $\sigma(v_k)=rv_{k+1}$
so that $\sigma^{(s)}(v_k) = r(r+1) \cdots (r+s-1)v_{k+s}.$ Applying Lemma \ref{independent1} to the $v_i$'s we get
\begin{equation*}
V =
\begin{bmatrix}
v_1 & v_2  & \cdots & v_p\\
rv_2 & rv_3  & \cdots & rv_{1}\\
\vdots & \vdots  &  & \vdots \\
r_p v_p  & r_p v_1  & \cdots & r_p v_{p-1}
\end{bmatrix}
\end{equation*}
where $r_p := r(r+1) \cdots(r+p-2)$ and  the indices $i$ of the $v_i$'s are defined modulo $p.$ We see that $d=\det(V)$
is up to a nonzero constant in $\F_p$ the  same as $d_1 = \det(V_1)$ where $V_1$ is the left-circulant matrix
\begin{equation*}
V_1 =
\begin{bmatrix}
v_1 & v_2  & \cdots & v_p\\
v_2 & v_3  & \cdots & v_{1}\\
\vdots & \vdots  &  & \vdots \\
 v_p  &  v_1  & \cdots & v_{p-1}
\end{bmatrix}
\end{equation*}
But $d_1$ differs by $\pm 1$ from the determinant $d_2=\det(V_2)$ where $V_2$ is the circulant matrix
$V_2 := circ(v_1, \ldots,v_p).$

Using Lemma \ref{detpp} we obtain
$$
\det(V_2)= (v_1+ \cdots +v_{p})^p  =( \beta(n))^p.
$$
The result follows from this.
\end{proof}

The following is well known.
\begin{lemma}
\label{lede}
For any period $d$ of $B(n),$ one has 
\begin{itemize}
\item[(a)]
$$
r^d =1.
$$
\item[(b)]
$$
d \equiv 1 \pmod{2p}.
$$
\end{itemize}
\end{lemma}

\begin{proof}
The first assertion follows from \cite[Proposition 1.2  a)]{caretal}. The second assertion
follows from part b) of the same proposition, precisely follows from  \cite[Proposition 1.2  b)]{caretal},
and from \cite[Lemma 1.1]{caretal}.
\end{proof}
\begin{lemma}
\label{betapem1} We have
\begin{itemize}
\item[(a)]
$$
\beta(p-1) - \beta(0)=\beta(d-1).
$$
\item[(b)]
$$
\beta(d-1)= \emph{\textrm{Tr}}(r^{-c(p)-2})r^{c(p)}
$$
\end{itemize}
\end{lemma}

\begin{proof}
Observe that $(r+i)^{p-1}-1 = (r+i)^{-1}$ for all $i=0, \ldots, p-1.$ Multiplying both sides by $\epsilon(i)$ and
summing over $i$ we get $\beta(p-1) - \beta(0)= \beta(-1).$ But by Lemma \ref{lede} (a) one has
$$
(r+k)^{-1} = (r+k)^{d-1}
$$
for any $k=0,\dots,p-1$ so that
$$
\beta(-1)= \sum_{k=0}^{p-1} \epsilon(k)(r+k)^{-1} = \sum_{k=0}^{p-1} \epsilon(k)(r+k)^{d-1}= \beta(d-1).
$$
This proves (a).
By Corollary \ref{betaasbell} (b) we get (b). An alternative proof of (a) is as follows.
By Corollary \ref{betaasbell} (c) $\beta(d-1) = \beta(-1)$ and by Corollary \ref{formulasbell} (a), with $n=-1$ we get
$\beta(-1) = \beta(p-1) - \beta(0).$
\end{proof}

We recall some known but useful properties of the trace.
\begin{lemma}
\label{traceproperties}
For $x, y \in \F_q$ set
$$
<x,y> :=  \emph{ \textrm{Tr}}(xy),
$$
and $Q(x) := <x,x> = \emph{ \textrm{Tr}}(x^2).$
Define $w_j := \frac{1}{r+j} \in \F_q$ for all $j=0, \ldots, p-1.$
Then
\begin{itemize}
\item[(a)]
$<\cdot,\cdot> :\F_q \to \F_p$ is a $\F_p$-bilinear form
with associate quadratic form $Q: \F_q \to \F_p.$
\item[(b)]
$\{w_0, \ldots w_{p-1}\}$ is a self-dual normal basis of $\F_q$ over $\F_p$ relative to the bilinear form $<\cdot,\cdot>.$
In other words, we have $<w_i,w_j> = 0$ if $i \neq j$ and $Q(w_i)=1$ for all $i.$
Moreover, $w_{j+1}=\sigma(w_j)$ for all $j.$
\end{itemize}
\end{lemma}

In the following lemma we get the explicit values of the constants $A, B$ of Lemma \ref{nonzerocp}.

\begin{lemma}
\label{becepe} We have
\begin{itemize}
\item[(a)]
$$
\emph{\textrm{Tr}}(r^{c(p)}) = B(c(p)).
$$ 
\item[(b)]
$$
\emph{\textrm{Tr}}(r^{-c(p)-2}) = - \frac{B(d-1)}{B(c(p))}.
$$
\item[(c)]
$$
\emph{\textrm{Tr}}(r^{-c(p)-1}) = \frac{1}{B(c(p))}.
$$
\end{itemize}
\end{lemma}

\begin{proof}
By (\ref{trace}) 
\begin{equation}
\label{beecee}
B(c(p)) = - \textrm{Tr}(r^{c(p)}) (-1).
\end{equation}
By (\ref{trace}) again and by (\ref{beecee})
$B(d-1) = - B(c(p))\textrm{Tr}(r^{-c(p)-2}).$ Since $1=B(0)$, we get (c) from (\ref{trace}) and part (a).
\end{proof}

\begin{lemma}
\label{les}
One has
$$
r^{-c(p)-2} =s^2, \text{where}\; s =r^{\frac{-c(p)-2}{2}} \text{if}\; 
p \equiv 1 \pmod{4}\;
$$
$$
\text{and}\; s = r^{c(p)\frac{p-1}{2}(-c(p)-2)} \text{when}\;
p \equiv 3 \pmod{4}.
$$
\end{lemma}

\begin{proof}
From $c(p)(p-1) = g(p)(p-2)+1$ we see that $r^{c(p)(p-1)}=r$ and that $p \equiv 1 \pmod{4}$ if and only if
$c(p)$ is even, so that $s$ is well defined and satisfies the equation.
\end{proof}

\begin{lemma}
\label{identityforBB1}
One has
$$
(r^{-c(p)-2})^p = r^{-1-c(p)}\frac{1}{(r+1)^2}.
$$
\end{lemma}

\begin{proof}
From $c(p)(p-1) = g(p)(p-2)+1$ we got $r^{-pc(p)} = r^{-1-c(p)}$ so that
$$
(r^{-c(p)-2})^p = r^{-1-c(p)} (\frac{1}{r^p})^2 =r^{-1-c(p)}\frac{1}{(r+1)^2}.
$$
\end{proof}

\begin{lemma}
\label{tracexoverminus1}
Let $x(r) \in \F_q$ be such that $x(r)^p = \frac{1}{r} x(r).$
One has
\begin{itemize}
\item[(a)]
$$
\emph{\textrm{Tr}}\left(\frac{x(r)}{r-1}\right) = x(r)\beta(d-1).
$$
\item[(b)]
$$
B(d-1) = -\emph{\textrm{Tr}}(r^{c(p)})\emph{\textrm{Tr}}\left(\frac{x(r)}{r-1}\right) = \sum_{j=2}^p B(j).
$$
\end{itemize}
\end{lemma}

\begin{proof}
Set $a := \frac{x(r)}{r-1}.$ Set $\sigma^{(0)}(a)=a.$
By induction one has 
$$
\sigma^{(i)}(a) = \frac{1}{(r+i-1)^2}\frac{1}{r+i-2} \cdots \frac{1}{r} x(r)
$$
for all $i=0,\ldots p-1.$ So $\textrm{Tr}(a)=x(r) \gamma(r)$
where
$$
\gamma(r) =\frac{1}{r-1}+\frac{1}{r^2}+\frac{1}{(r+1)^2r}+\frac{1}{(r+2)^2(r+1)r} + \cdots + \frac{1}{(r+p-2)^2(r+p-3) \cdots r}.
$$
But by using the definition of $\beta(d-1)$ and the identity  $r(r+1)(r+2) \cdots (r+p-1) =1$ it is easy to check that
$$
\left(\beta(d-1)- \frac{1}{r+p-1}\right) + \frac{1}{r-1} = \gamma(r)
$$
i.e., that $\gamma(r)=\beta(d-1),$ 
so that we get (a). In order to obtain (b), we may take $x(r)$ nonzero, i.e., by using Lemma \ref{ypry}, we take
$x(r)=r^{-c(p)}.$ Observe also that by Lemma \ref{betapem1} (b) we have
$\beta(d-1)= \textrm{Tr}(r^{-c(p)-2})r^{c(p)}$ so that by using (a) together with (\ref{trace}) we get
$-\textrm{Tr}(r^{c(p)})\textrm{Tr}\left(\frac{x(r)}{r-1}\right) = B(d-1).$ From the equalities $\frac{1}{r-1}=(r-1)^{p-1}-1$ and
$x(r)=r^{-c(p)}$
we obtain
$\textrm{Tr}\left(\frac{x(r)}{r-1}\right)= \sum_{k=1}^{p-1} \textrm{Tr}(r^{-c(p)-1+(k+1)})$ from which, by multiplying both sides by
$- \textrm{Tr}(r^{c(p)})$  and using again (\ref{trace}) it follows readily the latter
equality of (b).
\end{proof}

\begin{lemma}
\label{identityforBB}
One has
$$
B(d-2p) = B(d-1).
$$
\end{lemma}

\begin{proof}
By (\ref{trace}) the result is equivalent to $\textrm{Tr}(H)=0$, where
$H = r^{-c(p)-1}(r^{d-2p} - r^{d-1}).$  Using $r^p=r+1$ we see that $H=r^{-1-c(p)}\frac{1}{(r+1)^2} - r^{-c(p)-2}$.
The result follows from Lemma \ref{identityforBB1}.
\end{proof}

\begin{lemma}
\label{identityforBBB}
One has
$$
B(d-2p+2) +2B(d-2p+1)+B(d-2p)= B(d).
$$
\end{lemma}

\begin{proof}
Follows from  (\ref{trace}) and from the identity obtained
\begin{equation}
\label{identityp}
r^2+2r+1 = r^{2p}
\end{equation}
by multiplying both sides of (\ref{identityp}) by $r^{-1-c(p)-2p}.$ 
\end{proof}

\begin{lemma}
\label{identityCS}
\begin{itemize}
\item[(a)]
One has for $n \geq s,$
$$
\sum_{m=0}^{n} m^s \binom{n}{m}D(m) = n! \sum_{j=0}^{s}(-1)^j \binom{s}{j} n^{s-j} B(j).
$$
\item[(b)] For $n=1, \ldots, p-1$ one has
$$
(-1)^n B(n)  \equiv \sum_{m=1}^{p-1} (-1)^m m^n D(m-1) \pmod{p}.
$$
\end{itemize}
\end{lemma}

\begin{proof}
Part (a) is the main result of \cite{clarkesved}; part (b) is \cite[Corollary 1]{sunzagier}.
\end{proof}

\begin{lemma}
\label{sumofallB}
One has
$$
\sum_{j=0}^{p-1} \beta(j) = \beta(d-1).
$$
More generally we have  for any $i$ not exceeding $p,$
$$
\sum_{j=i}^{p+i-1} \beta(j) = \sum_{h=0}^{i} \binom{i}{h} \beta(d+h-1).
$$
\end{lemma}

\begin{proof}
One has $S := \sum_{j=0}^{p-1} \beta(j) = \sum_{i=0}^{p-1}\epsilon(i) \sum_{j=0}^{p-1}(r+i)^j =
\sum_{i=0}^{p-1} \epsilon(i) \left( \frac{(r+i)^p-1}{r+i-1} \right)$
so that, by using $\epsilon(i)(r+i)= \epsilon(i-1)$ and with $j=i-1,$ we get
$$
S = \sum_{j=-1}^{p-2} \frac{ \epsilon(j)}{r+j} = \sum_{k=0}^{p-1} \frac{\epsilon(k)}{r+k} = \beta(d-1).
$$
The other formula has a similar proof.
\end{proof}

\begin{lemma}
\label{bp2}
Let $p$ be an odd prime number. In $\F_p$ one has
$$
B(p)=2.
$$
\end{lemma}

\begin{proof}
Since $B(0)=1$ and $B(1)=1,$ by Lemma \ref{touchardlemma} one has in $\F_p$
$$
1+1 = B(0)+B(1) = B(0+p)=B(p).
$$
This proves the result.
\end{proof}

\begin{lemma}
\label{alternatesum}
One has
\begin{itemize}
\item[(a)]
$$
\sum_{j=0}^{p-1} (-1)^j \beta(j) = \beta(p).
$$
\item[(b)]
$$
\sum_{j=0}^{p-1} (-1)^j B(j) = B(p) = 2.
$$
\end{itemize}
\end{lemma}

\begin{proof}
Part (a) follows from Theorem \ref{betatrace} (b) with $n=p-1.$ Part (b) follows from (a), from Theorem \ref{betatrace}
and from Lemma \ref{bp2}.
\end{proof}

\begin{lemma}
\label{partialfrac}
For all $i=0, \ldots,p-1$
$$
\frac{1}{r(r+1) \cdots (r+i-1)(r+i)^2} = \frac{A_{i,0}}{r} + \frac{A_{i,1}}{r+1}+ \cdots + \frac{A_{i,i-1}}{r+i-1}+ 
\frac{A_{i,i}}{r+i}+ \frac{B_{i,i}}{(r+i)^2}
$$
where  for $0 \leq j \leq i-1$
$$
A_{i,j} := \frac{(-1)^j}{j! (i-j)! (i-j)},
$$
$$
A_{i,i} :=(-1) \sum_{j=0}^{i-1} A_{i,j},
$$
and
$$
B_{i,i} := \frac{(-1)^i}{i!}.
$$
\end{lemma}

\begin{proof}
Follows from computing the partial fraction decomposition (the partial fraction decomposition
procedure is described in, e.g., \cite[pages 187--190]{lang}) of
$$
R(x,i) := \frac{1}{x(x+1) \cdots (x+i-1)(x+i)^2}
$$
and then specializing $x=r.$ 
\end{proof}

We give now more details in how $R(r,k)$ is found:

\begin{remark}
\label{coeffsPF}
We write the fraction $R(x,k) = \frac{1}{x(x+1) \cdots (x+k-1)(x+k)^2}$ that when $k=0$ becomes $\frac{1}{x^2},$
in the form
\begin{equation}
\label{leere1}
R(x,k) = \frac{A_{i,0}}{x} + \frac{A_{i,1}}{x+1}+ \cdots + \frac{A_{k,k-1}}{x+k-1}+ 
\frac{A_{k,k}}{x+k}+ \frac{B_{k,k}}{(x+k)^2}
\end{equation}
with unknown coefficients in $\F_p$, and as denominators the irreducible linear divisors of the denominator $D(x)$ of $R(x,k)$
raised to powers from $1$ up to the multiplicity in which they appear in $D(x).$ Next we determine the coefficient $A_{k,j} \in \F_p$
where $0 \leq j \leq k-1$ by computing in $\F_p$ as follows
$$
A_{k,j} := \left[ R(x,k) \cdot (x+j)  \right]_{ x=-j}
$$
$$
 = \left[ \frac{1}{x(x+1) \cdots (x+j-1) \cdot (x+j+1) \cdots (x+k-1)(x+k)^2} \right]_{x=-j}
$$

$$
= \frac{1}{(-j)(-j+1) \cdots (-1) \cdot 1 \cdots (-j+k-1)(-j+k)^2}
$$

$$
= \frac{(-1)^j}{j! (k-j)!(k-j)}.
$$
The coefficients $B_{k,k}$ are determined in the same manner, namely:
$$
B_{k,k} := \left[ R(x,k) \cdot (x+k)^2  \right]_{ x=-k}
$$
$$
=   \left[ \frac{1}{x(x+1) \cdots (x+k-1)} \right]_{x=-k}
$$
$$
= \frac{1}{(-k) \cdot (-k+1)  \cdots (-k+k-2) \cdot (-k+k-1)}
$$
$$
= \frac{1}{(-1)^k \cdot k \cdot(k-1)  \cdots (k-(k-2)) \cdot (k -(k-1))}
$$
$$
= \frac{(-1)^k}{k!}.
$$

In order to compute $A_{k,k}$ we multiply both sides of  \eqref{leere1} by $(x+k)$ to get
\begin{equation}
\label{limite}
 \frac{1}{x(x+1) \cdots (x+k-1)(x+k)} = \sum_{j=0}^{k-1} \frac{x+k}{x+j}\cdot A_{k,j} + A_{k,k} + \frac{B_{k,k}}{x+k}.
\end{equation}

Now we work in the $\frac{1}{t}$-adic completion $\overline {\F_p(t)}$ of $\F_p(t)$. We let $x$ go to infinity in
$\overline {\F_p(t)}$ in both sides of \eqref{limite}. This gives
$$
0 = \sum_{j=0}^{k-1} A_{k,j} + A_{k,k}.
$$
Finally, we observe that we can get an explicit expression for $A_{k,k}$ by using the following.
Put $Q(x) = x(x+1) \cdots(x+k-1)$ so that $R(x,k) = \frac{1}{Q(x) \cdot (x+k)^2}.$
We have the formula, as for the classical partial fraction decompositions  over the complex numbers,
$$
A_{k,k} = \left[ (R(x,k) \cdot (x+k)^2)' \right]_{x=-k},
$$
in which the $'$ denotes formal derivation relative to $x,$
that becomes
$$
A_{k,k} = (-1) \cdot  \frac{Q'(-k)}{Q(-k)^2}
$$
since $x=-k$ is a double root of the denominator of $R(x,k).$ 
Here $Q'(x)$ is the formal derivative  of $Q(x)$
relative to $x.$
After a short computation we obtain $Q(-k)^2 = k! ^2$ and $Q'(-k) = \sum_{j=0}^{k-1} \frac{(-1)^{k-1} \cdot k!}{k-j}$
so that we obtain the explicit formula.
$$
A_{k,k} = \frac{(-1)^k}{k!} \cdot \sum_{j=0}^{k-1} \frac{1}{k-j}.
$$
\end{remark}



\begin{lemma}
\label{autodual}
Let $w_0 := \epsilon(0),$ $w_1 := F(w_0), \ldots, w_{p-1} := F^{(p-1)}(w_0).$ Then $\{w_i \mid i=0,\ldots,p-1\}$
is a self-dual normal basis of $\F_q$ over $\F_p$ relative to the bilinear form
$$
<x,y> = \emph{\textrm{Tr}}(xy).
$$ 
\end{lemma}

\begin{proof}
We see immediately that $w_i = \frac{\epsilon(i)}{\epsilon(i-1)} = \frac{1}{r+i}.$ The result follows then from
Lemma \ref{traceproperties}.
\end{proof}


\begin{lemma}
\label{partialfrac2}
For all $i=0, \ldots,p-1$ one has
$$
\frac{1}{(r+i)^2} = -\frac{1}{r+i} + \frac{1}{1} \frac{1}{(r+i+1)} +  \frac{1}{2} \frac{1}{(r+i+2)}+ \cdots + \frac{1}{p-1} \frac{1}{(r+i+p-1)}.
$$
\end{lemma}

\begin{proof}
Write $\frac{1}{(r+i)^2}$ in the $\F_p$--basis  $\{ \frac{1}{(r+j)}, j=0,\ldots,p-1\}$.
By Lemma \ref{autodual} it suffices to prove that $\textrm{Tr}(\frac{1}{r^2}\frac{1}{r+j}) = \frac{1}{j}$ when $j \neq 0$
and that $\textrm{Tr}(\frac{1}{r^2}\frac{1}{r}) = -1.$  Since $r(r+1) \cdots (r+p-1)=1$ we can write 
$$
\frac{1}{r^2}\frac{1}{r+j} = \frac{(r+1) \cdots (r+j-1)(r+j+1) \cdots (r+p-1)}{r}
$$
when $j \neq 0.$  Thus, $\textrm{Tr}(\frac{1}{r^2}\frac{1}{r+j}) = \frac{(p-1)!}{j}\textrm{Tr}(\frac{1}{r}) = \frac{1}{j}.$
When $j=0$ it is better to use the identity $\frac{1}{r^2}+\frac{1}{r^3} = r^{p-3}$ to conclude that
$\textrm{Tr}(\frac{1}{r^3}) = -1.$
\end{proof}

Proof of Theorem \ref{equivkurepa}: In what follows when we say that we get a condition, e.g., (a), this means
that  we prove that the condition (a) is equivalent to the condition $K(p)=0.$

\begin{proof}
Assume that $\beta(d-1)=0$. From Proposition \ref{betaka} we get $K(p)=0.$ Now assume that $K(p)=0.$ From Proposition
\ref{betaka} we get $\textrm{Tr}(\beta(d-1)=0.$ It follows from Theorem \ref{betatrace} (b) that $B(d-1)=0.$ Now we use
Corollary \ref{betaasbell}, part (a) to deduce that $\beta(d-1)=0.$ This depends on proving $T \neq 0$. This is guaranteed by Lemma
\ref{Tnonzero}. Thus, we get (a). See also Remark \ref{both}.
 From Lemma \ref{betapem1} and from (a)
we get (b). From Theorem \ref{betatrace} (b), Lemma \ref{becepe} (b) and (a) we get (c) since $B(d-1)=- \textrm{Tr}(\beta(d-1)).$
From (c) and Lemma \ref{les} we get (d). From Lemma \ref{identityforBBB}, from Lemma \ref{identityforBB}  and from (a)
we get that the left hand side equals $B(d)=B(0)=1;$ this proves (e). From Lemma \ref{identityforBB1} and (c) follows (f).
If $\beta(d-1)=0$ then $\textrm{Tr}(\beta((d-1)r)=0.$ For the other direction we argue as follows.
Since by Theorem \ref{beta} $r\beta(d-1)=\sigma(\beta(d-1))$ the result (g) now follows by taking traces and by using (a). From Lemma
\ref{ypry} we can take $\epsilon =r^{-c(p)}$. It follows then from Lemma \ref{becepe} (b) that 
$\textrm{Tr}\left(\frac{\epsilon}{r^2}\right) = \textrm{Tr}\left(\frac{\epsilon}{r-1}\right) =\beta(d-1) \epsilon$ since 
$\sigma\left(\frac{\epsilon}{r-1}\right)=\frac{\epsilon}{r^2}.$ The equality $\textrm{Tr}\left(\frac{\epsilon}{r-1}\right) =\beta(d-1) \epsilon$ 
follows also from Lemma \ref{tracexoverminus1} (a)  with $x(r)=r^{-c(p)}.$ Thus, (h) and (i) follows from Lemma 
\ref{tracexoverminus1} (b). (X): One has $B(p-1)=1$ from (b) and Corollary \ref{betaasbell} (a).  (Y): We have $D(p-1)=0$
from (X) and Theorem \ref{extendsz} (g). (Z): We obtain $D(p-2)=1$ from (Y) and (\ref{derangementx}). Thus, we get (j).
Since by Lemma \ref{lede}
$d-1=0$ in $\F_p,$ we get (k)
by Theorem \ref{extendsz} (h) with $m=d-1,$ and from (c), since $(r+d-1)^{-1} = (r+pk+1-1)^{-1} = r^{-1}$ for some
$k \in \Z$. 
From Lemma \ref{sumofallB}, Theorem \ref{betatrace}
and (a) it follows (l). From (h) with $\epsilon=r^{-c(p)}$ it follows (m) since $r^{-c(p)-2} \cdot r^2 = r ^{-c(p)}$. While (n) follows
from (m) and from Lemma \ref{becepe}, parts (c) and (b), together with (a) by using $\frac{r^2}{r-1}=r+1+\frac{1}{r-1}$. More precisely, 
(n) is obtained by taking traces in both sides of this equality.
From Lemma \ref{alternatesum} (b)
we got $2=B(p) = \sum_{j=0}^{p-1} (-1)^jB(j)$ that combined with (l) proves (o). From Lemma \ref{identityCS} (b) with
$n=p-1$ and using (j) we get (p).  More precisely,  the Lemma gives  $B(p-1) = \sum_{m=1}^{p-1} (-1)^mD(m-1)$ since $m^{p-1}=1$
for all $m$ in this rang. Multiply both sides of this equality by $(-1)$, put $h=m-1$ as new variable and observe that
$(-1) \cdot (-1)^{h+1} = (-1)^h$ to get
$-B(p-1)=\sum_{h=0}^{p-2}(-1)^hD(h) = -D(p-2) + \sum_{h=0}^{p-3}(-1)^hD(h).$  But by (j), $D(p-2)=1$ and by taking traces in (b)
and by using Theorem \ref{betatrace} part (b), we obtain also $B(p-1)=1.$ This proves (p).

Alternatively we can also get (p) by taking $s=p-1$ and $n=p-1$ in 
Lemma \ref{identityCS} (a). This gives in the left hand side $\sum_{m=1}^{p-1}(-1)^mD(m)$ since $0^{p-1}=0,$
$m^{p-1}=1$ and ${{p-1} \choose m} = (-1)^m.$ But, $D(p-2)=1$ by (j) and $D(p-1)=B(p-1)-1$
by Theorem \ref{extendsz} part (g), so that $D(p-1)=0$ since $B(p-1)=1$ as above in the first proof of (p).
Thus the left hand side becomes $\sum_{m=1}^{p-3}(-1)^mD(m) + (-1).$

The same procedure gives in the right hand side 
$(-1) \cdot \sum_{j=0}^{p-1} (-1)^j(-1)^{p-1-j}B(j) = (-1) \cdot \sum_{j=0}^{p-1}B(j)$ since $(p-1)! =-1$, 
${{p-1} \choose j} = (-1)^j$ and $(-1)^{p-1}=1.$ 
But by using Lemma \ref{alternatesum} part (b), we obtain that the right hand side is equal to $-2.$
Comparing both sides we get $\sum_{m=1}^{p-3}(-1)^mD(m) + (-1) = -2$ so that 
$\sum_{m=0}^{p-3}(-1)^mD(m) = 1+(-1)=0$ since $(-1)^0 \cdot D(0)=1.$ This completes the second proof of  (p).

We get (q) by using Theorem \ref{stirlingbasis} with $n=d-1$ and from (a). Observe that
$\beta(d-1)= \sum_{k=0}^{p-1} R(r,k)$ with the notations in the proof 
of Lemma \ref{partialfrac} since $r(r+1) \cdots (r+p-1)=1.$ We get the values of $A_{i,j}$, $A_{i,i}$ and $B_{i,i}$
from Lemma \ref{partialfrac}. By using Lemma \ref{partialfrac2} we have then for an appropriate $\beta_{p-1} \in \F_p$
\begin{equation}
\label{basedual}
\beta(d-1)= \frac{\beta_{0}}{r} + \frac{\beta_{1}}{r+1}  + \cdots + \frac{\beta_{p-2}}{r+p-2} + \frac{\beta_{p-1}}{r+p-1}
\end{equation} 
Thus (see Lemma \ref{autodual}) $\beta(d-1)=0$ is equivalent to $\beta_j=0$ for all $j=0,\ldots,p-1.$
But $\beta(d-1)=0$ is also equivalent to $\beta_{p-1}=0$ since from (\ref{basedual}) and Lemma \ref{autodual}
 $\beta_{p-1}= \textrm{Tr}(\frac{\beta(d-1)}{r-1})= \textrm{Tr}(\frac{\beta(d-1)^p}{r})= \textrm{Tr}(\beta(d-1)) = -B(d-1).$
This proves (r). See details in how $R(r,k)$ is found in Remark  \ref{coeffsPF} just after Lemma \ref{partialfrac}.
\end{proof}

The conjecture has been worked out numerically (see, e.g.,\cite{mijaj}, \cite{zivkoviccomput}).
The latest available result (see \cite{tata}) is that it holds true
for all odd prime numbers less than $10^9.$  This is a non trivial computation since a straightforward
GP-Pari computation took $7$ minutes in a relatively recent computer to get the single value $K(10^9+7)= 571737251.$
Using machine idle time on our local computer we obtained (using \cite{tata}) that the conjecture is true
when $2 <p \leq 10^9+785617.$ 
However, we are not aware of the existence of any \emph{infinite}
subset of the odd prime numbers for which the conjecture holds. Set $K(n) := 0! + 1! + \cdots + (n-1)!.$
One of the equivalent forms of the conjecture is that
for all $n \geq 3$ one has $n \nmid K(n).$ It is easy to check that if for some $n \geq 3$ one has  $n \nmid K(n)$ then
$kn \nmid K(kn)$ for all positive integers $k$ (see also \cite[ Corollary 1.3.1]{kurepa}.
So this form of the conjecture holds for an infinity of $n's.$  Another equivalent form of the conjecture (see \cite{kurepa})
is that for all
$n>1$ one has $\gcd(K(n),n!)=2.$ One can check that if this condition holds for an infinity of $n$'s then it holds for all $n$'s
since $\gcd(K(n),n!)=2 \iff$ for all odd primes $p\leq n$ one has $p \nmid K(p).$
By mistake, probably confounding these two forms of the conjecture,
 \cite{ivicmijaj} state that Kurepa proved in 
 \cite{kurepa} that
for an infinity of $n$'s we have $\gcd(K(n),n)=2.$
 
Recently Bencherif and Oesterl\'e (see \cite{barskyb2})
discovered that the published proof of the conjecture (see \cite{barskyb1}) had a fatal gap.  In a letter to Guy (see \cite[B44]{guy})
Reg. Bond proposed (unpublished) a proof. \u Zivcovi\'c  (see \cite[page 403]{zivkovic}) 
says that he informed him that he later discovered an error in the proof. 

Finally, we discuss other applications of formula (\ref{trace}).

\subsection{A short summary of previous results on string of consecutive zeros
 of $B(n)$ in $\F_p$, simplified by  (\ref{trace})}
\label{historic}
Consider the maximal number $m$ of consecutive zeros of $B(n)$ in $\F_p.$ By Lemma
(\ref{touchardlemma}) $m \leq p-1.$ Radoux proved \cite{radoux}, assuming that the minimal period $d$ of $B(n)$
satisfies $d=g(p),$ that there exists one and only
one string of  $p-1$ consecutive zeros by period. This was extended by Layman \cite{layman} to any period $d$ of 
$B(n)$ modulo $p.$ The exact location of the string of zeros was only given modulo $g(p).$ More precisely,
let $b$ denote the exact beginning of the string of $p-1$ consecutive zeros.
Radoux give $b (p-1) \equiv p \pmod{g(p)}$, Layman give $b \equiv 1 - \frac{p^p-p}{(p-1)^2} \pmod{g(p)},$
 for the location of the first zero in the string. Later Kahale \cite{kahale} give
$b=c(p)+1.$
We just observe here that Kahale's result follows immediately from formula  (\ref{trace}). Indeed, since
for all $k=0,\ldots,p-2$ one has in $\F_p$
\begin{equation}
\label{tracezeros}
\textrm{Tr}(r^k) =0,
\end{equation}
(see Lemma \ref{traceofs}),
i.e.,
\begin{equation}
\label{stringzeros}
\textrm{Tr}(r^{c(p)+k+1-(c(p)+1)}) =0,
\end{equation}
so that by (\ref{trace}) we get immediately
\begin{equation}
\label{stringdone}
B(c(p)+k+1) \equiv 0 \pmod{p}
\end{equation}
for all these $k$'s.

\subsection*{Acknowledgements}
We are indebted to the kind french mathematician that carefully read an old draft of this paper
and suggested several improvements. We are also grateful to the referee that worked in great detail 
a first version of the paper and gives us many interesting suggestions. The  presentation of the present paper has been
greatly improved by his comments.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \bibliographystyle{plain} 
% \bibliography{myBibFile} 
% If you use BibTeX to create a bibliography
% then copy and past the contents of your .bbl file into your .tex file

\begin{thebibliography}{99}

\bibitem{aigner} M. Aigner. \newblock
 A characterization of the Bell numbers. \newblock
{\em Discrete Math.}, 205(1--3):207--210, 1999. 

\bibitem{bourbaki} N. Bourbaki. \newblock
{\em \'El\'ements de  Math\'ematique. Alg\`ebre, Chapitres 4 \`a 7.} \newblock
Paris etc,: Masson, VII, 422 p., 1981.

\bibitem{brenner} J. L. Brenner. \newblock
 $g-$circulant matrices over a field of prime characteristic. \newblock
{\em Illinois J. Math.}, 7:174--179, 1963.

\bibitem{carlitzB} L. Carlitz. \newblock
 Congruences for generalized Bell and Stirling numbers. \newblock
{\em Duke Math. J.}, 22:193--205, 1955.

\bibitem{carlitzK} L. Carlitz. \newblock
 A note on the left factorial function. \newblock
{\em Math. Balkanica}, 5:37--42, 1975.

\bibitem{dragovic} B. Dragovi\'c. \newblock
 On some finite sums with factorials. \newblock
{\em Facta Univ., Ser. Math. Inf.}, 14:1--10, 1999.

\bibitem{guy} R. K. Guy. \newblock
{\em Unsolved problems in number theory. }
\newblock 2nd ed., Problem Books in
Mathematics, Springer-Verlag, New York. Unsolved Problems
in Intuitive Mathematics, I., 1994.

\bibitem{kahale} N. Kahale. \newblock
 New modular properties of Bell numbers. \newblock
{\em J. Combin. Theory Ser. A}, 58(1):147--152, 1991.

\bibitem{kohnen} W. Kohnen. \newblock
 A remark on the left-factorial hypothesis. \newblock
{\em Univ. Beograd. Publ. Elektrotechn. Fak. Ser. Mat.}, 9:51-53, 1998. 

\bibitem{kurepa} D. Kurepa. \newblock
 On the left factorial function $!n$. \newblock
{\em Math. Balkanica}, 1(1):147--153, 1971. 

\bibitem{kurepa3} D. R. Kurepa. \newblock
 Right and left factorials. \newblock Conferenze tenuti
in occasione del cinquantenario dell' Unione Matematica Italiana (1972),
{\em Boll. Un. Mat. Ital}, 4(9):171--189, 1971.

\bibitem{kurepa2} D. Kurepa. \newblock
 On some new left factorial propositions. \newblock
{\em Math. Balkanica}, 4:383--386, 1974.

\bibitem{lang} S. Lang. \newblock
{\em Algebra.} Revised third ed., Graduate Texts in Mathematics, 211,
Springer-Verlag, New York, 2002.

\bibitem{layman} J. W. Layman. \newblock
 Maximum zero strings of Bell numbers modulo primes. \newblock
{\em J. Combin. Theory Ser. A}, 40(1):161--168, 1985.

\bibitem{lehmer} D. H. Lehmer. \newblock
 Some properties of circulants. \newblock
{\em J. Number Theory},  5:43--54, 1973.

\bibitem{mijaj} \u Z. Mijajlovi\'c. \newblock
 On some formulas involving $!n$ and
the verification of the $!n$-hypothesis by use
of computers. \newblock
{\em Publ. Inst. Math. (Beograd) (N.S.)}, 47(61):24--32, 1990.

\bibitem{ocagne} M. d'Ocagne. \newblock
 Sur une classe de nombres remarquables. \newblock
{\em Amer. J. Math.}, 9:353--380, 1887.

\bibitem{ore} O. Ore. \newblock
 Some studies on cyclic determinants. \newblock
{\em Duke Math. J.}, 18:343--354, 1951.

\bibitem{pitmanj} J. Pitman. \newblock
 Some probabilistic aspects of set partitions. \newblock
{\em Amer. Math. Monthly}, 104(3):201--209, 1997.

\bibitem{petoj} A. Petojevi\'c. \newblock
 On Kurepa's hypothesis for the left factorial. \newblock
{\em Filomat}, 12(1):29--37, 1998.

\bibitem{radoux} C. Radoux. \newblock
 Nombres de Bell, modulo $p$ premier,
et extensions de degr\'e $p$ de $F_p.$ \newblock
{\em C. R. Acad. Sci. Paris S\'er. A-B}, 281(21):A879--A882, 1975.

\bibitem{radoux1} Chr. Radoux. \newblock
Arithm\'etique des nombres de Bell et analyse modulo $p$-adique. \newblock
{\em Bull. Soc. Math. Belg.}, 29(1):13--28, 1977.

\bibitem{radoux2} Chr. Radoux. \newblock
D\'eterminants de Hankel et th\'eor\`eme de Sylvester. \newblock
S\'eminaire Lotharingien de Combinatoire (Saint-Nabor, 1992), 115--122,
{\em Publ. Inst. Rech. Math. Av., 498, Univ. Louis Pasteur, Strasbourg,}, 1992.

\bibitem{zsami} Z. S\u ami. \newblock
 On generalization of functions $n!$ and $!n$. \newblock
{\em Publ. Inst. Math., Nouv. S\'er.}, 60(74):5--14, 1996.

\bibitem{bsegre} B. Segre. \newblock
 Arithmetische Eigenschaften von Galois-R\"aumen, I.. \newblock
{\em Math. Ann.}, 154:195--256, 1964.

\bibitem{igorsh} I. E. Shparlinskiy. \newblock
 On the distribution of Values of Recurring
Sequences and the Bell Numbers in Finite Fields. \newblock
{\em Europ. J. Combinatorics}, 12:81--87, 1991.

\bibitem{silva} J. A. Silva. \newblock
 A theorem on cyclic matrices. \newblock
{\em Duke Math. J.}, 18:821--825, 1951.

\bibitem{stanko} J. Stankovi\'c. \newblock
 \"Uber einige Relationen zwischen Fakult\"aten
und den linken Fakult\"aten. \newblock
{\em Math. Balkanica}, 3:488--495, 1973.

\bibitem{svarc} \u S. \u Svarc. \newblock
 On a class of polynomials over a finite field. \newblock
{\em Math.-Fyz. \u Casopis. Slovensk. Akad. Vied.},  10:68--80, 1960.

\bibitem{tata} M. Tatarevic. \newblock
 Searching for a counterexample to the Kurepa's left
factorial hypothesis ($p < 10^9)$. \newblock
{\em http://mtatar.wordpress.com/2011/07/30/kurepa/}, 2011.

\bibitem{touchard} J. Touchard. \newblock
 Nombres exponentiels et nombres de Bernoulli. \newblock
{\em Canad. J. Math.}, 8:305--320, 1956.

\bibitem{vladim} V. S. Vladimirov. \newblock
 Left factorials, Bernoulli numbers, and
the Kurepa conjecture. \newblock
{\em Publ. Inst. Math. (Beograd) (N.S.)}, 72(86):11--22, 2002.

\bibitem{voloch} J. F. Voloch. \newblock
 On some subgroups of the multiplicative group of finite rings. \newblock
{\em J. Th\'eor. Nombres Bordeaux}, 16(1):233--239, 2004.

\bibitem{williams} G. T. Williams. \newblock
 Numbers generated by the function $e^{e^{x}-1}$. \newblock
{\em Amer. Math. Monthly.}, 52:323--327, 1945.

\bibitem{zoran} \u S. Zoran N.. \newblock
 A sequence $u_{n,m}$ and Kurepa's hypothesis on left factorial. \newblock
Symposium Dedicated to the Memory of Duro Kurepa (Belgrade, 1996),
{\em Sci. Rev. Ser. Sci. Eng.}, 19--20:125--113, 1996.

\bibitem{zivkovic} M. \u Zivkovi\'c. \newblock
 The number of primes $\sum_{i=1}^n (-1)^{n-i} i!$ is finite. \newblock
{\em Math. Comp.}, 68(225):403--409, 1999.

\bibitem{zivkoviccomput} M. \u Zivkovi\'c. \newblock
 Massive computation as a problem solving tool. \newblock
{\em Proceedings of the 10th congress of Yugoslav mathematicians, Belgrade, Yugoslavia,
January 21-24, 2001, Belgrade: University of Belgrade, Faculty of Mathematics,}
pages 113--128. 2001.

\bibitem{barskyb1} D. Barsky, B. Benzaghou. \newblock
 Nombres de Bell et somme de factorielles. \newblock
{\em J. Th\'eor. Nombres Bordeaux}, 16(1):1--17, 2004.

\bibitem{barskyb2} D. Barsky, Benzaghou. \newblock
 Erratum \`a l'article Nombres de Bell et somme de factorielles. \newblock
{\em J. Th\'eor. Nombres Bordeaux}, 23(2):527, 2011.

\bibitem{beckerriordan} H. W. Becker, J. Riordan. \newblock
 The arithmetic of Bell and Stirling numbers. \newblock
{\em Amer. J. Math.}, 70:385--394, 1948.

\bibitem{clarkesved} R. J. Clarke, M. Sved. \newblock
 Derangements and Bell numbers. \newblock
{\em Math. Mag.}, 66(5):299--303, 1993.

\bibitem{caretal} M. Car, L. H. Gallardo, O. Rahavandrainy, L. N. Vaserstein. \newblock
About the period of Bell numbers modulo a prime. \newblock
{\em Bull. Korean Math. Soc.}, 45(1):143--155, 2008.

\bibitem{rcoulter} R. Coulter, M. Henderson. \newblock
 A note on the roots of trinomials over a finite field. \newblock
{\em Bull. Austral. Math. Soc.}, 69(3):429--432, 2004.

\bibitem{daltonlevine} R. E. Dalton, J. Levine. \newblock
 Minimum periods, modulo $p$, of
first order Bell exponential integers. \newblock
{\em Math. Comp.}, 16:416--423, 1962.

\bibitem{knuthGP} R. L. Graham, D. E. Knuth, O. Patashnik. \newblock
{\em Concrete mathematics, A foundation for computer science.} \newblock
Addison-Wesley Publishing Company, Advanced Book Program,
Reading, MA, 1989.

\bibitem{ivicmijaj} A. Ivi\'c, \u Z. Mijajlovi\'c. \newblock
 On Kurepa's problems in number theory. \newblock
{\em Publ. Inst. Math. (Beograd) (N.S.), Duro Kurepa memorial volume}, 57(71):19--28, 1995.

\bibitem{niederreiter} R. Lidl, H. Niederreiter. \newblock
{\em Finite Fields,
Encyclopedia of Mathematics and its applications}. Cambridge
University Press (1983), Reprinted, 1987.

\bibitem{lunnonPS} W. F. Lunnon, P. A. B. Pleasants, N. M. Stephens. \newblock 
Arithmetic properties of Bell numbers to a composite modulus I.. \newblock
{\em Acta Arith.}, 35(1):1--16, 1979.

\bibitem{samw1} P. Montgomery, S. Nahm, S. S. Wagstaff, Jr.. \newblock 
The period of the Bell numbers modulo a prime. \newblock
{\em Math. Comp.}, 79(271):1793--1800, 2010.

\bibitem{petojzizov} A. Petojevi\'c, M. \u Zi\u zovi\'c. \newblock
Trees and the Kurepa hypothesis for left factorial. \newblock
{\em Filomat}, 13:31--40, 1999.

\bibitem{petojzizovcvej} A. Petojevi\'c, M. \u Zi\u zovi\'c, S. D. Cveji\'c. \newblock
Difference equations and new equivalents of the Kurepa hypothesis. \newblock
{\em Math. Morav.}, 3:39--42, 1999.

\bibitem{saikiasub} P. K. Saikia, D. Subedi. \newblock
Bell numbers, determinants and series. \newblock
{\em Proc. Indian Acad. Sci. (Math. Sci.)}, 123(2):151--166, 2013.

\bibitem{stankoz} J. Stankovi\'c, M. \u Zi\u zovi\'c. \newblock
Noch einige Relationen zwischen den Fakult\"aten
und den linken Fakult\"aten. \newblock
{\em Math. Balkanica}, 4:555--559, 1974.

\bibitem{sunzagier} Z. W. Sun, D. Zagier. \newblock
On a curious property of Bell numbers. \newblock
{\em Bull. Aust. Math. Soc.}, 84(1):153--158, 2011.

\end{thebibliography}

\end{document}