<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}
\usepackage{amstext}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}



\begin{document}


\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf 
On a Congruence Modulo $n^3$ Involving Two  \\
\vskip .1in
Consecutive Sums of Powers}
\vskip 1cm
\large
Romeo Me\v strovi\'{c} \\
Maritime Faculty\\
University of Montenegro \\
85330 Kotor \\
Montenegro \\
\href{mailto:romeo@ac.me}{\tt romeo@ac.me} 
  \end{center}

\vskip .2 in
\begin{abstract}
For various positive integers $k$, the sums of $k$th powers 
of the first $n$ positive integers, $S_k(n):=1^k+2^k+\cdots +n^k$,
are some of the most popular sums in all of mathematics.
In this note we prove a congruence modulo $n^3$ involving  
 two consecutive sums $S_{2k}(n)$ and  $S_{2k+1}(n)$.
This congruence allows us to establish an equivalent formulation of Giuga's 
conjecture. Moreover, if $k$ is even and $n\ge 5$ is a prime such that 
$n-1\nmid 2k-2$, then this congruence is satisfied modulo 
$n^4$.  This suggests a conjecture about when
a prime can be a Wolstenholme prime. 
We also propose  several Giuga-Agoh-like conjectures. Further, we establish  
two congruences modulo $n^3$ for two  binomial-type  sums involving sums of 
powers $S_{2i}(n)$ with $i=0,1,\ldots ,k$. Finally, we obtain an 
extension of a result of Carlitz-von Staudt for odd power sums. 
  \end{abstract}

\section{Introduction and basic  results}\label{intro}

The sum of powers of integers $\sum_{i=1}^ni^k$
 is a well-studied problem in mathematics (see, e.g., \cite{bo,sc}).
Finding formulas for these sums has interested mathematicians 
for more than 300 years since the time of Jakob Bernoulli (1654--1705).
Several methods were used to find the sum $S_k(n)$ (see, for example, 
Vakil \cite{va}). These lead to numerous recurrence relations.
For a nice account of  sums of powers, see Edwards \cite{ed3}.
For simplicity, here as always in the sequel,
 for all integers $k\ge 1$ and $n\ge 2$ we write
  $$
S_k(n):=\sum_{i=1}^{n-1}i^{k}=1^{k}+2^{k}+3^{k}+\cdots+(n-1)^{k}.
   $$ 
The study of these sums led Jakob Bernoulli
to develop numbers later named in his honor. Namely, the celebrated
{\it Bernoulli  formula} (sometimes called {\it Faulhaber's formula})
gives the sum $S_k(n)$ explicitly as (see, e.g., Beardon \cite{be})
    \begin{equation}
  \label{1.1}
S_k(n)= \frac{1}{k+1} \sum_{i=0}^{k}{k+1\choose i} n^{k+1-i}B_{i},
    \end{equation}
where $B_i$ ($i=0,1,2,\ldots$)
are the {\it Bernoulli numbers} defined by the generating function
   $$
\sum_{i=0}^{\infty}B_i\frac{x^i}{i!}=\frac{x}{e^x-1}.
  $$
It is easy to find the values $B_0=1$, $B_1=-\frac{1}{2}$, 
$B_2=\frac{1}{6}$, $B_4=-\frac{1}{30}$, and $B_i=0$ for odd $i\ge 3$. 
Furthermore, $(-1)^{i-1}B_{2i}&gt;0$ for all $i\ge 1$. 
These and many other properties can be found, for instance, in \cite{ir}. 
Several generalizations of the  formula \eqref{1.1} were established 
by Z.-H. Sun (\cite[Thm.\ 2.1]{su1} and \cite{su2}) and 
Z.-W. Sun \cite{su3}. 

By the well-known {\it Pascal's identity} proven by Pascal in 1654 
(see, e.g., \cite{ms2}), we have
 \begin{equation}
   \label{1.2}
\sum_{i=0}^{k-1}{k\choose i}S_{i}(n+1)=(n+1)^k-1.
   \end{equation}
Recall also that the  formula \eqref{1.2} is also presented in Bernoulli's 
{\it Ars Conjectandi} \cite{ber}, (also see  \cite[pp.\ 269--270]{gkp}) 
published posthumously in 1713. 

On the other hand, divisibility properties of the sums $S_k(n)$ were 
investigated by many authors  \cite{ds, le, ms, sm1}. For example, in 2003 
Damianou and  Schumer \cite[Thm.\ 1, p.\ 221 and Thm.\ 2, p.\ 222]{ds} 
proved, respectively: 

\medskip

(1) if $k$ is odd, then $n$ divides $S_k(n)$ if and only if $n$ is incogruent
to 2 modulo 4; 

\medskip

(2) if $k$ is even, then  $n$ divides $S_k(n)$
if and only if $n$ is not divisible by any prime $p$ such that
$p\mid D_k$, where $D_k$ is the denominator  of the $k$th  Bernoulli
number $B_k$. 

\medskip

Denominators of  Bernoulli numbers $B_k$ $(k=0,1,2,\ldots)$
are given as the sequence \seqnum{A027642} in \cite{sl} 
(cf.\ also its subsequence \seqnum{A002445}
consisting of the terms with even indices $k$).

Motivated by the recurrence formula for $S_k(n)$
recently obtained in \cite[Corollary 1.7]{me2},
in this note  we prove the following basic result. 
 \begin{theorem}
  \label{t1.1}
Let $k$ and $n$ be positive integers. Then for each $k\ge 2$
  \begin{equation}
   \label{1.3}
2S_{2k+1}(n)- (2k+1)nS_{2k}(n)
\equiv \begin{cases}
0 \pmod{n^3}, &amp; \text{if $k$ is even or $n$ is odd}\\
&amp; \text{or $n\equiv 0$ (mod 4)};\\
\frac{n^3}{2} \pmod{n^3}, &amp; 
\text{if $k$ is odd and $n\equiv 2$ (mod 4)}.
 \end{cases}
  \end{equation}
  Furthermore, 
\begin{equation}
   \label{1.4}
2S_{3}(n)-3nS_{2}(n)\equiv
\begin{cases}
 0\pmod{n^3}, &amp;  \text{if $n$ is odd};\\
 \frac{n^3}{2}\pmod{n^3}, &amp; \text{if $n$ is even.}
\end{cases}
\end{equation}

In particular, for all $k\ge 1$ and $n\ge 1$, we have
 \begin{equation}
   \label{1.5}
2S_{2k+1}(n)\equiv (2k+1)nS_{2k}(n)\pmod{n^2},
 \end{equation}
and for all $k\ge 1$ and $n\not\equiv 2$ \rm{(mod 4)}
 \begin{equation}
   \label{1.6}
2S_{2k+1}(n)\equiv (2k+1)nS_{2k}(n)\pmod{n^3}.
 \end{equation}
\end{theorem}
 
Combining the congruence \eqref{1.5} and the ``even case'' (2) of a result 
of Damianou and Schumer 
\cite[Thm.\ 1, p.\ 221 and Thm.\ 2, p.\ 222]{ds}
mentioned above, we obtain the following ``odd'' extension of their result. 

\begin{corollary}
 \label{c1.2}
If $k$ is an odd positive integer and $n$ a positive integer such that 
$n$ is not divisible by any prime $p$ such that
$p\mid D_{k-1}$, where $D_{k-1}$ is the denominator  of the $(k-1)$th  
Bernoulli number $B_{k-1}$, then  $n^2$ divides $2S_k(n)$.

Conversely, if  $k$ is an odd positive integer and $n$ a positive integer
relatively prime to $k$ such that $n^2$ divides $2S_k(n)$,
then $n$ is not divisible by any prime $p$ such that
$p\mid D_{k-1}$, where $D_{k-1}$ is the denominator  of 
the $(k-1)$th  Bernoulli number $B_{k-1}$.
\end{corollary}

The paper is organized as follows.
Some applications of Theorem \ref{t1.1} are presented in the following 
section. In Subsection \ref{subs2.1}
we give  three particular cases 
of the congruence \eqref{1.3} of Theorem \ref{t1.1} (Corollary \ref{c2.1}). 
One of these congruences immediately yields a
reformulation  of Giuga's conjecture in terms of the divisibility of 
$2S_n(n)+n^2$ by $n^3$ (Proposition \ref{p2.2}).

In the next subsection we establish the fact that
the   congruence  \eqref{1.6} holds  modulo $n^4$ whenever  
$n\ge 5$ is a prime  such that $n-1\nmid 2k-2$ (\eqref{2.7} of Proposition 
\ref{p2.5}). Motivated by some particular cases of this congruence and 
related computations in {\tt Mathematica 8}, we propose 
several Giuga-Agoh-like conjectures. In particular, Conjecture \ref{c2.10}
characterizes Wolstenholme primes as positive integers $n$ 
such that $S_{n-2}(n)\equiv 0$ (mod $n^3$). 

In Subsection \ref{subs2.3} we establish  two congruences modulo $n^3$ 
for two  binomial  sums involving sums of powers $S_{2i}(n)$ 
with $i=0,1,\ldots ,k$ (Proposition \ref{p2.15}).

Combining the congruence \eqref{1.5} of Theorem \ref{t1.1} with 
the Carlitz-von Staudt result for determining $S_{2k}(n)$ (mod $n$) 
(Theorem \ref{t2.18}), in the last subsection of Section \ref{sec2}, we extend 
this result modulo $n^2$ for power sums $S_{2k+1}(n)$ (Theorem \ref{t2.21}). 

 Recall that {\it Erd\H{o}s-Moser Diophantine equation} 
is the equation of the form
      \begin{equation}
    \label{2.22}
1^k+2^k+\cdots +(m-2)^k+(m-1)^k=m^k
     \end{equation}
where $m\ge 2$ and $k\ge 2$ are positive integers.
Notice that $(m,k)=(3,1)$ is the only solution for $k=1$.
In letter to Leo Moser around 1950, Paul Erd\H{o}s
conjectured that such solutions of the above equation do not exist
(see \cite{mos}). Using remarkably elementary 
methods, Moser \cite{mos} showed in 1953 that if 
$(m,k)$ is a solution of \eqref{2.22} with $m\ge 2$ and $k\ge 2$, 
then $m&gt;10^{10^6}$ and $k$ is even. 
We believe that  Theorem \ref{t2.21} 
can be useful for study some Erd\H{o}s-Moser-like Diophantine equations 
with odd $k$ (see Remark \ref{c2.24}).

Proofs of all our results are given in Section \ref{sec3}.

\section{Applications of Theorem \ref{t1.1}}\label{sec2}
   \subsection{Variations of Giuga-Agoh's conjecture}\label{subs2.1} 
Taking $k=(n-1)/2$ if $n$ is odd,  $k=n/2$ if $n$ is even
and $k=(n-2)/2$ if $n$ is  even
 into \eqref{1.3} of Theorem \ref{t1.1}
we obtain respectively the following three congruences.
 \begin{corollary}
  \label{c2.1}
 If $n$ is an odd positive integer, then 
 \begin{equation}
   \label{2.1}
2S_n(n)\equiv n^2S_{n-1}(n)\pmod{n^3}.
 \end{equation}
If $n$ is even, then 
 \begin{equation}
  \label{2.2}
2S_{n+1}(n)- n(n+1)S_n(n)\equiv
\begin{cases} 0\pmod{n^3}, &amp; \text{if $n\equiv 0$ (mod 4)};\\
 \frac{n^3}{2}\pmod{n^3}, &amp; \text{if $n\equiv 2$ (mod 4)}
\end{cases}
  \end{equation}
and 
 \begin{equation}
  \label{2.3}
2S_{n-1}(n)\equiv n(n-1)S_{n-2}(n)\pmod{n^3}.
 \end{equation}
In particular, for each even $n$ we have  
\begin{equation}
   \label{2.4}
S_{n-1}(n)\equiv\begin{cases}
 0\pmod{n}, &amp; \text{if $n\equiv 0$ (mod 4)};\\
 \frac{n}{2}\pmod{n}, &amp; \text{if $n\equiv 2$ (mod 4)}.
\end{cases}
  \end{equation}
  \end{corollary}
Notice that if $n$ is any prime, then  by Fermat's little theorem
we have
$S_{n-1}(n)\equiv -1$ (mod $n$).  
In 1950 Giuga \cite{gi} conjectured that a positive integer
$n\ge 2$ is a prime if and only if 
 $S_{n-1}(n)\equiv -1$ (mod $n$).
This conjecture is  related to the sequences 
\seqnum{A029875}, \seqnum{A007850}, \seqnum{A198391}, 
 \seqnum{A199767}, \seqnum{A226365} and \seqnum{A029876} in \cite{sl}. 
The following proposition provides an equivalent formulation 
of Giuga's conjecture. 
  \begin{proposition}
  \label{p2.2}
The following conjectures are equivalent:

\begin{itemize}
\item[{\rm(i)}]  A positive integer $n\ge 3$ is a prime if and only if 
 \begin{equation}
   \label{2.5}
S_{n-1}(n)\equiv -1 \pmod{n}.
 \end{equation}

\item[{\rm(ii)}]  A positive integer
$n\ge 3$ is a prime if and only if 
 \begin{equation}
  \label{2.6}
2S_n(n)\equiv -n^2\pmod{n^3}.
 \end{equation}
\end{itemize}
\end{proposition}

The above conjecture (ii) is  related to the sequence 
\seqnum{A219540} in \cite{sl}.
Since by  the congruence \eqref{2.4}, $S_{n-1}(n)\not\equiv -1$ (mod $n$) 
for each even $n\ge 4$, without loss of generality Giuga's conjecture may be 
restricted to the set of odd positive integers.  
In view of this fact and the fact that by \eqref{2.1}, $n^2\mid S_n(n)$ for 
each odd $n$, Proposition \ref{p2.2} yields the following equivalent   
formulation of Giuga's conjecture. 
  \begin{conjecture}[Giuga's conjecture]\label{c2.3}
An odd integer $n\ge 3$ is a prime if and only if 
 \begin{equation*}
\frac{2S_n(n)}{n^2}\equiv -1\pmod{n}.
 \end{equation*}
 \end{conjecture}

\begin{remark}\label{r2.4} It is known that $S_{n-1}(n)\equiv -1$ (mod $n$)
if and only if for each prime divisor $p$ of $n$, $(p-1)\mid (n/p-1)$
and $p\mid (n/p-1)$ (see \cite{gi}, \cite[Thm.\ 1]{bbb}). Therefore,
any counterexample to Giuga's conjecture must be squarefree. 
Giuga \cite{gi} showed that there are no exceptions to the conjecture
up to $10^{1000}$. In 1985 Bedocchi \cite{bed} improved this bound 
to $n&gt;10^{1700}$. Finally, in 1996 Borwein et. al.\ raised  the bound to $n&gt;10^{13887}$. 
Recently,  Luca,  Pomerance, and  Shparlinski \cite{lps}
proved that for any real number $x$, the number of counterexamples to
Giuga's conjecture $G(x):=\#\{n&lt;x:\, n \mbox{ is composite and}
\,\,S_{n-1}(n)\equiv -1$ (mod $n)\}$  
satisfies the estimate $G(x)=o(\sqrt{x})$ as $x\to\infty$.

Independently, in  1990  Agoh  \cite{ag} (published in 1995; 
see also \cite{bw} and the sequence \seqnum{A046094} in 
\cite{sl})  conjectured that a positive integer $n\ge 2$ is a prime if and 
only if  $nB_{n-1}\equiv -1$ (mod $n$).
Note that the denominator of the  number $nB_{n-1}$ can be greater than 1, but
since by the von Staudt-Clausen theorem (1840) (see, e.g., 
\cite[Thm.\ 118]{hw}; cf.\ the equality \eqref{2.18} given below), the 
denominator of any Bernoulli number $B_{2k}$ is squarefree, it follows that  
the denominator of $nB_{n-1}$ is invertible modulo $n$. In 1996  it was  
reported by   Agoh \cite{bbb} that his conjecture is equivalent 
to Giuga's conjecture, and hence the name ``Giuga-Agoh conjecture'' found in the
literature.  It was pointed out in \cite{bbb} 
that this can be seen  from the Bernoulli formula \eqref{1.1} after some
analysis involving the von Staudt-Clausen theorem.
The equivalence of both conjectures is proved  in detail 
in 2002 by  Kellner \cite[Satz 3.1.3, Section 3.1, p.\ 97]{kel1} 
(also see \cite[Thm.\ 2.3]{kel2}).  

Quite recently,  Grau and  Oller-Marc\'en 
\cite[Corollary 4]{gm} proved that an integer $n$ is a counterexample to 
Giuga's conjecture if and only if it is both a Carmichael and a Giuga number
(for definitions and more information on  Carmichael numbers
see  Alford  et al.\ \cite{agc} and  Banks and Pomerance \cite{bp},
and for  Giuga numbers see  Borwein et al.\ \cite{bbb}, 
 Borwein and  Wong \cite{bw},  and Wong \cite[Chapter 2]{w}; 
also see  the sequences \seqnum{A007850} and \seqnum{A002997} in  \cite{sl}). 
Furthermore, several open problems concerning Giuga's conjecture
can be found in [8, E Open Problems].
\end{remark}

\subsection{The congruence \eqref{1.3} holds modulo $n^4$ for 
a prime $n\ge 5$}\label{subs2.2} 
The following result  shows that for each prime $n\ge 5$ the first congruence
of \eqref{1.3} also holds modulo $n^4$.
 \begin{proposition}\label{p2.5}
Let $p\ge 5$  be a prime  and let $k\ge 2$
be a positive integer such that $p-1\nmid 2k-2$. Then   
      \begin{equation}
\label{2.7}
2S_{2k+1}(p)\equiv (2k+1)pS_{2k}(p)\pmod{p^4}.
  \end{equation}
Furthermore, if $p-1\nmid 2k$, then    
  \begin{equation}
 \label{2.8}
S_{2k-1}(p)\equiv 0\pmod{p^2}.
  \end{equation}
  \end{proposition}
As a consequence of Proposition \ref{p2.5}, we obtain the following 
``supercongruence'' which generalizes Lemma 2.4 in \cite{me1}.

\begin{corollary}\label{c2.6} Let $p\ge 5$ 
be a prime  and let $k$ be a positive integer such that 
$k\le (p^4-p^3-4)/2$ and $p-1\nmid 2k+2$.  Then
       \begin{equation}
    \label{2.9}
2R_{2k-1}(p)\equiv (1-2k)pR_{2k}(p)\pmod{p^4}
  \end{equation}
where
  $$
R_{s}(p):=\sum_{i=1}^{p-1}\frac{1}{i^s},\quad s=1,2,\ldots.
  $$
  \end{corollary}
\begin{remark}\label{r2.7} 
Z.-H. Sun \cite[Section 5, Thm.\ 5.1]{su4}
in terms of Bernoulli numbers explicitly determined 
$\sum_{i=1}^{p-1}(1/i^k)$ (mod $p^3$) 
for each prime $p\ge 5$ and $k=1,2,\ldots,p-1$. In particular,
substituting the second congruence of Theorem 5.1(a) in \cite{su4}
(with $2k$ instead of even $k$) into \eqref{2.7}, we immediately obtain 
the following ``supercongruence'':
  $$
R_{2k-1}(p)\equiv\frac{k(1-2k)}{2}\left(\frac{B_{2p-2-2k}}{p-1-k}
-4\frac{B_{p-1-2k}}{p-1-2k} \right)p^2\pmod{p^4}
  $$
for all primes $p\ge 7$  and $k=1,\ldots ,(p-5)/2$.

By \cite[(5.1) on p.~206]{su4},
    \begin{equation}\label{2.10}
S_{2k}(p)\equiv\frac{p}{3}(3B_{2k}+k(2k-1)p^2B_{2k-2})\pmod{p^3},
    \end{equation}
which, inserting into \eqref{2.7}, gives 
   \begin{equation}\label{2.11}
S_{2k+1}(p)\equiv\frac{2k+1}{2}p^2B_{2k}\pmod{p^4}
   \end{equation}
for all primes $p\ge 5$ and positive integers $k\ge 2$
such that $p-1\nmid 2k-2$. Moreover, \eqref{2.7} with $2k=p-1\ge 4$ 
(i.e., $p\ge 5$) directly gives
   $$
S_{p}(p)\equiv \frac{p^2}{2}S_{p-1}(p)\pmod{p^4}.
  $$
Taking $2k+1=p$ into \eqref{2.11}, we find that
   $$
S_{p}(p)\equiv\frac{p^3}{2}B_{p-1}\pmod{p^4},
   $$
which  reducing modulo $p^3$, and using the congruence 
$pB_{p-1}\equiv -1$ (mod $p$), yields $2S_{p}(p)\equiv -p^2$ (mod $p^3$).
This is actually  the congruence \eqref{2.6} of Proposition \ref{p2.2}
with a prime $n=p\ge 5$. 

Comparing the above two congruences gives 
$S_{p-1}(p)\equiv pB_{p-1}$ (mod $p^2$) for each prime $p\ge 5$.
However, the  congruence \eqref{2.10} with $2k=p-1$ implies that 
for all primes $p\ge 5$
  \begin{equation*}
S_{p-1}(p)\equiv pB_{p-1}\pmod{p^3}.
   \end{equation*}
\end{remark}
 \begin{remark}\label{r2.8}
A computation shows that each of the congruences 
   $$
S_{n}(n)\equiv \frac{n^3}{2}B_{n-1}\pmod{n^4}
   $$
and
  $$
S_{n-1}(n)\equiv nB_{n-1}\pmod{n^3}
   $$
is also satisfied for numerous odd composite positive integers $n$.
However, we propose the following conjecture. 
 \end{remark}
 \begin{conjecture}\label{c2.9}
Each of the congruences
$$
S_{n}(n)\equiv \frac{n^3}{2}B_{n-1}\pmod{n^5},
   $$
  $$
S_{n-1}(n)\equiv nB_{n-1}\pmod{n^4}
   $$
 is satisfied for none integer $n\ge 2$.  
\end{conjecture}

Similarly, taking  $k=(p-3)/2$ into \eqref{2.11} for each prime $p\ge 5$ 
we get 
    \begin{equation}
 \label{2.12}
S_{p-2}(p)\equiv\frac{(p-2)p^2}{2}B_{p-3}\pmod{p^4}.
   \end{equation}
Therefore, $p^3\mid S_{p-2}(p)$ if and only if the numerator 
of the Bernoulli number $B_{p-3}$ is divisible by $p$, and such a prime is 
said to be {\it Wolstenholme prime} (see, e.g., \cite[Section 7]{me3}). 
Numerators of  Bernoulli numbers $B_k$ $(k=0,1,2,\ldots)$
are given as the sequence \seqnum{A027641} in \cite{sl} (cf.\ also its 
subsequence \seqnum{A000367} consisting of the terms with even indices
 $k$). The only two known such primes  
are 16843 and 2124679, and by a result of McIntosh and Roettger from 
\cite{mr}, these primes are the only two  Wolstenholme primes less than $10^9$.
Wolstenholme primes are given as the sequence \seqnum{A088164} which is a 
subsequence of irregular primes \seqnum{A000928} in \cite{sl} (cf.\ the 
sequence \seqnum{A177783}). In view of the above congruence, and our 
computation via {\tt Mathematica 8} up to $n=20000$ we have the following 
two conjectures.
 \begin{conjecture}\label{c2.10}
A positive integer $n\ge 2$ is a Wolstenholme prime if and only if
   $$
S_{n-2}(n)\equiv 0\pmod{n^3}.
   $$
\end{conjecture}
 \begin{conjecture}\label{c2.11}
The congruence 
   $$
S_{n-2}(n)\equiv 0\pmod{n^4}
   $$
is satisfied for none integer $n\ge 2$. 
\end{conjecture}
\begin{remark}\label{r2.12} Quite recently, inspired by Giuga's conjecture,  
 Grau, Luca, and  Oller-Marc\'en \cite{glm} studied the odd positive integers 
$n$ satisfying the congruence 
  $$
S_{(n-1)/2}(n)\equiv 0 \pmod{n}.
   $$
Grau et al.\  \cite[Section 2, Proposition 2.1]{glm} observed that this 
congruence is satisfied for each odd prime $n$ and for each odd positive 
integer $n\equiv 3$ (mod $4$). Notice that if $n=4k+3$ with $k\ge 0$, 
then the first part of the congruence \eqref{1.3} yields
  $$
2S_{(n-1)/2}(n)\equiv \frac{(n-1)n}{2}S_{(n-3)/2}(n)\pmod{n^3}
  $$
which  by the congruence \eqref{2.7}  holds  modulo
$n^4$ for each prime $n\ge 7$ such that $n\equiv 3$ (mod $4$).
Multiplying the above congruence by $2$ and reducing the modulus,
immediately gives 
 $$
4S_{(n-1)/2}(n)\equiv -nS_{(n-3)/2}(n)\pmod{n^2}.
  $$
The above congruence shows that $S_{(n-1)/2}(n)\equiv 0$ (mod $n^2$)  
for some  $n\equiv 3$ (mod $4$) if and only if  
$S_{(n-3)/2}(n)\equiv 0$ (mod $n$). 
Furthermore, reducing the congruence \eqref{2.11} with $k=(p-3)/4$ 
where $p\ge 7$ is a prime such that  $p\equiv 3$ (mod $4$) gives
 \begin{equation}
  \label{2.13}
S_{(p-1)/2}(p)\equiv -\frac{p^2}{4}B_{(p-3)/2}\pmod{p^3},
  \end{equation}
whence it follows that for such a prime $p$, 
$S_{(p-1)/2}(p)\equiv 0$ (mod $p^2$).

On the other hand, if $n\equiv 1$ (mod $4$), that is
$n=4k+1$ with $k\ge 1$, the first part of the congruence 
\eqref{1.3} yields
  $$
2S_{(n+1)/2}(n)\equiv \frac{(n+1)n}{2}S_{(n-1)/2}(n)\pmod{n^3}
  $$
which  by the congruence \eqref{2.7} holds  modulo
$n^4$ for each prime $n\equiv 1$ (mod $4$).
Multiplying the above congruence by $2$ and reducing the modulus,
immediately gives 
 $$
4S_{(n+1)/2}(n)\equiv nS_{(n-1)/2}(n)\pmod{n^2}.
  $$ 
The above congruence shows that $S_{(n-1)/2}(n)\equiv 0$ (mod $n$)  
for some  $n\equiv 1$ (mod $4$) if and only if  
$S_{(n+1)/2}(n)\equiv 0$ (mod $n^2$).  
For example, by \cite[Proposition 2.3]{glm} (cf.\ Corollary \ref{c2.22}
 given below) both previous congruences  
are satisfied for every odd prime power $n=p^{2s+1}$ with any  prime 
$p\equiv 1$ (mod $4$) and a positive integer $s$. Moreover, 
reducing the congruence \eqref{2.10} with $k=(p-1)/4$ where $p\ge 5$ 
is a prime such that  $p\equiv 1$ (mod $4$) gives
 \begin{equation}
  \label{2.14}
S_{(p-1)/2}(p)\equiv pB_{(p-1)/2}\pmod{p^2}.
  \end{equation}
The congruence \eqref{2.14} shows that 
$S_{(p-1)/2}(p)\equiv 0$ (mod $p^2$) whenever  $p\equiv 1$ (mod $4$) 
is  an irregular prime for which $B_{(p-1)/2}\equiv 0$ (mod $p$).
To see that the converse is not true, consider the composite number 
$n=3737=37 \cdot 101$ satisfying $S_{(n-1)/2}(n)\equiv 0$ (mod $n^2$)
(this is the only such a composite number less than $16000$).   

Nevertheless,  in view of the congruences 
\eqref{2.13} and using arguments similar to those preceding Conjecture 
\ref{c2.10} (including a computation  up to $n=20000$), 
we have the following  conjecture.
  \end{remark}
 \begin{conjecture}\label{c2.13}
An odd positive integer $n\ge 3$ such that $n\equiv 3$ (mod $4$)
satisfies the congruence
   $$
S_{(n-1)/2}(n)\equiv 0\pmod{n^3}
   $$
if and only if $n$ is an irregular prime for which 
$B_{(n-3)/2}\equiv 0$ (mod $n$). 
 \end{conjecture}
We also propose the following conjecture. 
\begin{conjecture}\label{c2.14}
The congruence
   $$
S_{(n-1)/2}(n)\equiv 0\pmod{n^3}
   $$
is satisfied for none odd positive integer 
$n\ge 5$ such that $n\equiv 1$ (mod $4$).  
   \end{conjecture}

\subsection{Two congruences modulo $n^3$ involving power 
sums $S_k(n)$}\label{subs2.3} 
Combining the congruences of Theorem \ref{t1.1} with Pascal's identity,
we can arrive to the following congruences.
 \begin{proposition}\label{p2.15}
Let $k$ and $n$ be positive integers. Then
 \begin{equation}
  \label{2.15}
2\sum_{i=0}^k(1+n(k+1-i)){2k+2\choose 2i}S_{2i}(n)\equiv -2\pmod{n^3}
  \end{equation}
and 
 \begin{equation}
 \label{2.16}
2\sum_{i=0}^k\left({2k+2\choose 2i}+n(k+1){2k+1\choose 2i}\right)S_{2i}(n)
\equiv -2\pmod{n^3}.
  \end{equation}
\end{proposition}
 \begin{remark}\label{r2.16} Clearly, if $n$ is odd, then 
both congruences \eqref{2.15} and \eqref{2.16} remain also valid 
after dividing  by 2.
However, a computation in {\tt Mathematica 8} for small values $k$
and even $n$ suggests that this would be true  
for each $k$ and even $n$, and so we have
\end{remark}
\begin{conjecture}\label{c2.17}
The congruence
  \begin{equation*}
\sum_{i=0}^k(1+n(k+1-i)){2k+2\choose 2i}S_{2i}(n)\equiv -1\pmod{n^3}
  \end{equation*}
is satisfied for all $k\ge 1$ and even $n$.
  \end{conjecture}
\subsection{An extension of Carlitz-von Staudt result for odd 
power sums}\label{subs2.4} 
The following congruence is known as a {\it Carlitz-von Staudt's result}
 \cite{ca} in 1961  (for an easier proof see \cite[Thm.\ 3]{mo3}).
  \begin{theorem}\label{t2.18}{\rm(\cite{ca}, \cite[Thm.\ 3]{mo3})} 
Let $k$ and $n&gt;1$ be positive integers. Then
   \begin{equation}
   \label{2.17}
S_k(n)\equiv\begin{cases}
0 \pmod{\frac{(n-1)n}{2}}, &amp; \text{if $k$ is odd};\\
-\sum_{(p-1)\mid k, p\mid n}\frac{n}{p}\pmod{n}, &amp; 
\text{if $k$ is even},
\end{cases}
\end{equation}
where the summation is taken over all primes $p$ such that 
$(p-1)\mid k$ and $p\mid n$.
  \end{theorem}
     \begin{remark}\label{r2.19}
It is easy to show the first (``odd'') part of Theorem \ref{t2.18} 
(see, e.g., \cite[Proof of Theorem  3]{mo3} or
  \cite[Proposition 1]{ms}) whose proof is a modification of 
Lengyel's arguments in \cite{le}. 
Recall also that the classical {\it theorem of Faulhaber} 
(\cite{f}; also see \cite{be, dy, kn})  states that every 
sum $S_{2k-1}(n)$ (of odd power) can be expressed as a polynomial in the 
triangular number $T_{n-1}:=(n-1)n/2$ \seqnum{A000217} 
(cf.\ the sequences \seqnum{A079618} and \seqnum{A064538} in \cite{sl}).
For even powers, it has been shown that the sum $S_{2k}(n)$
is a polynomial in the triangular number $T_{n-1}$ multiplied 
by a linear factor in $n$ (see, e.g., \cite{kn}).
Quite recently, Dzhumadil'daev and  Yeliussizov \cite{dy}
established an analog of Faulhaber's theorem for a power sum of 
binomial coefficients. 
   \end{remark}
 \begin{remark}\label{r2.20}
The second part of the congruence \eqref{2.17} in Theorem \ref{t2.18} can be 
proved using  the famous von Staudt-Clausen theorem (given below) 
discovered  without proof by  Clausen \cite{cl} in 1840, and independently 
by von Staudt in 1840 \cite{st}; for alternative proofs, see, e.g., 
Carlitz \cite{ca}, Moree \cite{mo1} or  Moree \cite[Thm.\ 3]{mo3}.
This also follows from Chowla's proof of the von Staudt-Clausen theorem 
given in \cite{ch}. Namely, Chowla proved that the difference 
    $$
\frac{S_{2k}(n+1)}{n}-B_{2k}
    $$
is an integer for all positive integers $k$ and $n$.  This 
together with the facts  that $S_{2k}(n+1)\equiv S_{2k}(n)$ (mod $n$)
and that by the  {\it von Staudt-Clausen theorem},
     \begin{equation}
   \label{2.18}
B_{2k}=A_{2k}-\sum_{(p-1)\mid 2k\atop p\,\,\mathrm{prime}}\frac{1}{p},
    \end{equation}
where $A_{2k}$ is an integer, immediately gives the second part of 
the congruence \eqref{2.17}. This theorem is  related to the sequences 
\seqnum{A000146} in \cite{sl} (cf.\ \seqnum{A165908} and \seqnum{A027762}
in \cite{sl}).
Recall also that in many places, the von Staudt-Clausen theorem is stated in 
the following equivalent statement (see, e.g., \cite[page 153]{su}):
   \begin{equation*}
pB_{2k}\equiv \begin{cases}
 0 \pmod{p},&amp; \text{if $p-1\nmid 2k$};\\
-1\pmod{p}, &amp; \text{if $p-1\mid 2k$},
\end{cases}
  \end{equation*}
where $p$ is a prime and $k$ a positive integer.
      \end{remark}

Combining the congruence \eqref{1.5} in Theorem \ref{t1.1}  
with the second (``even'') part of the congruence \eqref{2.17},  
 we immediately obtain an improvement  of its first (``odd'')  part as follows.
  \begin{theorem}\label{t2.21}
Let Let $k$  and $n$ be positive integers. Then
    \begin{equation}
  \label{2.19}
2S_{2k+1}(n)\equiv -(2k+1)n\sum_{(p-1)\mid 2k, p\mid n}\frac{n}{p}\pmod{n^2},
   \end{equation}
where the summation is taken over all primes $p$ such that 
$p-1\mid k$ and $p\mid n$.
   \end{theorem}
In particular, taking $n=p^s$ and $k=(p^s-1)/4$ into \eqref{2.19}
where $p$ is an odd prime $p$ and $s\ge 1$ such that 
$p^s\equiv 1$ (mod $4$), we immediately obtain an 
 analogue of Proposition 2.3 in a recent paper \cite{glm}. 
 \begin{corollary}\label{c2.22}
Let $p$ be an odd prime. Then 
 \begin{equation*}
S_{(p^s+1)/2}(p^s)\equiv \begin{cases}
 0\pmod{p^{2s}}, &amp; \text{if $p\equiv 1$ (mod 4) and $s\ge 1$ is odd};\\
 -\frac{p^{2s-1}}{4}\pmod{p^{2s}}, &amp;  \text{if $s\ge 2$ is even.}
 \end{cases}
    \end{equation*}
  \end{corollary}
Finally, comparing \eqref{2.17}, \eqref{2.18} and \eqref{2.19}, we  
immediately obtain an ``odd'' extension of a result due to Kellner 
\cite[Thm.\ 1.2]{kel2} in 2004 (the congruence \eqref{2.20} given below).
   \begin{corollary}\label{c2.23}
Let $k$  and $n$ be positive integers. Then
    \begin{equation}
  \label{2.20}
S_{2k}(n)\equiv nB_{2k}\pmod{n} \,\,\,\,({\rm Kellner} \,\, [20])
  \end{equation}
and
      \begin{equation}
  \label{2.21}
2S_{2k+1}(n)\equiv (2k+1)n^2B_{2k}\pmod{n^2}.
   \end{equation}
\end{corollary}
\begin{remark}\label{c2.24}
Notice also that Theorem \ref{t2.18}  plays a key role in a recent  study 
(\cite{gmz, mo1, mo3, mru}) of the  Erd\H{o}s-Moser Diophantine equation
given by \eqref{2.22}. As noticed in Introduction, in 1953 Moser \cite{mos}  
showed that if $(m,k)$ is a solution of the equation \eqref{2.22} with 
$m\ge 2$ and $k\ge 2$, then $m&gt;10^{10^6}$ and $k$ is even. 
 Recently,  using Theorem \ref{t2.18},  Moree \cite[Thm.\ 4]{mo3} improved  
the bound on $m$ to $1.485\cdot 10^{9321155}$. That Theorem \ref{t2.18} can 
be used to reprove Moser's result was first observed in 1996 by Moree 
\cite{mo2}, where it played a key role in the study of the more general 
equation 
    \begin{equation}
  \label{2.23}
1^k+2^k+\cdots +(m-2)^k+(m-1)^k=am^k
  \end{equation}
where $a$ is a given positive integer. Moree \cite{mo2} generalized 
Erd\H{os}-Moser conjecture in the sense that the only solution 
of the ``generalized'' Erd\H{os}-Moser Diophantine
equation \eqref{2.23} is the trivial solution $1+2+\cdots +2a=a(2a+1)$.
Notice also that Moree \cite[Proposition 9]{mo2} proved that in any 
solution of the equation \eqref{2.23}, $m$ is odd. Nevertheless, motivated by 
the Moser's technique \cite[proof of Theorem 3]{mo3}  previously mentioned,
to study  \eqref{2.22},  we believe that  Theorem \ref{t2.21} 
would be  applicable in investigations of some other 
Erd\H{o}s-Moser type Diophantine equations with odd $k$. 
  \end{remark}

\section{Proofs of Theorem \ref{t1.1}, Corollaries \ref{c1.2}, \ref{c2.6},
 Propositions \ref{p2.2}, \ref{p2.5} and \ref{p2.15}}\label{sec3} 

\begin{proof}[Proof of Theorem \ref{t1.1}]
If $k\ge 1$ then by the binomial formula, for each $i=1,2,\ldots ,n-1$
we have  
  \begin{equation}\label{3.1}\begin{split}
&amp; 2(i^{2k+1}+(n-i)^{2k+1})-(2k+1)n(i^{2k}+(n-i)^{2k})\\
\equiv &amp; 2\left(i^{2k+1}-i^{2k+1})+{2k+1\choose 1}ni^{2k}
-{2k+1\choose 2}n^2i^{2k-1}\right)\\
&amp;-(2k+1)n\left(i^{2k}+i^{2k}-{2k\choose 1}ni^{2k-1}\right)\pmod{n^3}\\
=&amp; 2(2k+1)ni^{2k}-2(2k+1)kn^2i^{2k-1}-2(2k+1)ni^{2k}+
2(2k+1)kn^2i^{2k-1}\\
=&amp;0\pmod{n^3}.
   \end{split}\end{equation}
If $k\ge 3$ and  $n$ is odd then after summation of \eqref{3.1} 
over $i=1,2,\ldots,(n-1)/2$ we obtain
   \begin{equation}
  \label{3.2}
2\sum_{i=1}^{n-1}i^{2k+1}-(2k+1)n\sum_{i=1}^{n-1}i^{2k}\equiv 0\pmod{n^3}.
   \end{equation}
If $k\ge 2$ and $n$ is even
then after summation of \eqref{3.1} over $i=1,2,\ldots,n/2$ we get
   \begin{equation*}
2\sum_{i=1}^{n-1}i^{2k+1}+
2\left(\frac{n}{2}\right)^{2k+1}-
(2k+1)n\sum_{i=1}^{n-1}i^{2k}- 
(2k+1)n\left(\frac{n}{2}\right)^{2k}\equiv 0\pmod{n^3},
   \end{equation*}
or equivalently,
   \begin{equation}
  \label{3.3}
2S_{2k+1}-(2k+1)nS_{2k}\equiv \frac{kn^{2k+1}}{2^{2k-1}}=
\frac{n^3}{2}\cdot k\cdot \left(\frac{n}{2}\right)^{2k-2}
\pmod{n^3}.
   \end{equation}
Since for even $n$
 \begin{equation*}
\frac{n^3}{2}\cdot k\cdot \left(\frac{n}{2}\right)^{2k-2}\equiv 
  \begin{cases}
 0\,\pmod{n^3}, &amp; \text{if $k$ is even or $n\equiv 0$ (mod 4)};\\
\frac{n^3}{2}\pmod{n^3}, &amp; \text{ if $k$ is odd and $n\equiv 2$ (mod 4)},
\end{cases}
  \end{equation*}
this together with \eqref{3.3} and \eqref{3.2} yields both congruences of 
\eqref{1.3} in Theorem \ref{t1.1}.

Finally, for $k=1$ we have
  \begin{equation*}
2S_{3}(n)-3nS_{2}(n)= \frac{n^3}{2}\cdot 
(1-n)\equiv\begin{cases}
 0\pmod{n^3}, &amp; \text{if $n$ is odd};\\
 \frac{n^3}{2}\pmod{n^3}, &amp; \text{if $n$ is even}.
\end{cases}
   \end{equation*}
This completes the proof.
   \end{proof}
\begin{proof}[Proof of Corollary \ref{c1.2}] 
Both assertions follow immediately  from the congruence \eqref{1.5} 
and a result of Damianou and Schumer 
  \cite[Thm.\ 2,  p.\ 222]{ds} 
which asserts that if $k$ is even, then  $n$ divides $S_k(n)$
if and only if $n$ is not divisible by any prime $p$ such that
$p\mid D_k$, where $D_k$ is the denominator  of the $k$th  Bernoulli
number $B_k$.
 \end{proof}
\begin{proof}[Proof of Proposition \ref{p2.2}] {\it Proof of} 
$(i)\Rightarrow (ii)$. Suppose that Giuga's conjecture is true. Then if $n$ 
is an odd positive integer satisfying the congruence \eqref{2.6} of 
Proposition \ref{p2.2}, using this and \eqref{2.1} of Corollary \ref{c2.1}, 
we find that   
  $$
n^2S_{n-1}(n)\equiv 2S_n(n)\equiv -n^2\pmod{n^3},
  $$
whence we have 
  $$
S_{n-1}(n)\equiv -1\pmod{n}.
  $$
By Giuga's conjecture, the above congruence implies that
$n$ is a prime.

If  $n\ge 4$ is an even positive integer, then the congruence \eqref{2.4} 
shows that $S_{n-1}(n)\not\equiv -1$ (mod $n$). 
We will show that for such a $n$, $2S_{n}(n)\not\equiv -n^2$ (mod $n^3$).
Take $n=2^s(2l-1)$, where $s$ and $l$ are positive integers. Since 
for $i=1,2,\ldots$ we have $(2i)^n\equiv 0$ (mod $2^n$),
this together with the inequality $2^{2^s}\ge 2^{s+1}$ yields 
$(2i)^n\equiv 0$ (mod $2^{s+1}$). Therefore, we obtain
 $$
2S_n(n)\equiv 2\sum_{1\le j\le n-1\atop j\, {\rm odd}}j^n\pmod{2^{s+1}}. 
  $$ 
By Euler's theorem, for each odd $j$  we have
  $$
j^n=j^{2^s(2l-1)}=\left(j^{2^s}\right)^{2l-1}=
\left(j^{\varphi(2^{s+1})}\right)^{2l-1}\equiv 1\pmod{2^{s+1}}
\equiv 1\pmod{2^s},
  $$
where $\varphi(m)$ is Euler's totient function.
Substituting this into the above congruence, we get
  $$
2S_n(n)\equiv n=2^s(2l-1)\not\equiv 0\pmod{2^{s+1}}. 
  $$ 
Now, if  we suppose that $2S_{n}(n)\equiv -n^2$ (mod $n^3$),
then must be $2S_{n}(n)\equiv 0$ (mod $n^2$), and so,
$2S_{n}(n)\equiv 0$ (mod $2^{2s}$)$\equiv 0$
(mod $2^{s+1}$). This contradicts the above congruence,
and the implication $(i)\Rightarrow (ii)$ is proved. 

{\it Proof} of $(ii)\Rightarrow (i)$. 
Now suppose that Conjecture (ii) of Proposition \ref{p2.2} is true. Then if $n$
is an odd positive integer satisfying the congruence \eqref{2.5}, multiplying 
this by $n^2$ and using \eqref{2.1} of Corollary \ref{c2.1}, we find that   
  $$
2S_n(n)\equiv n^2S_{n-1}(n)\equiv -n^2\pmod{n^3},
  $$
which implies that 
  $$
2S_n(n)\equiv -n^2\pmod{n^3}.
  $$
By our Conjecture (ii), the above congruence implies that $n$ is a prime.

If  $n\ge 4$ is an even positive integer, then we have previously shown that 
for such a $n$, $2S_{n}(n)\not\equiv -n^2$ (mod $n^3$) 
and $S_{n-1}(n)\not\equiv -1$ (mod $n$). 
This completes the proof of  implication $(ii)\Rightarrow (i)$.
  \end{proof}

\begin{proof}[Proof of Proposition \ref{p2.5}]
If we extend the congruence \eqref{3.1} modulo $n^4$,  
then in the same manner we obtain 
 \begin{equation*}\begin{split}
&amp; 2(i^{2k+1}+(n-i)^{2k+1})-(2k+1)n(i^{2k}+(n-i)^{2k})\\
&amp;\equiv 2{2k+1\choose 3}n^3i^{2k-2}-
(2k+1){2k\choose 2}n^3i^{2k-2}\pmod{n^4},
  \end{split}\end{equation*}
whence it follows that
\begin{equation}
  \label{3.4}
2S_{2k+1}(n)-(2k+1)nS_{2k}(n)\equiv \frac{k(1-4k^2)}{3}n^3S_{2k-2}(n)
\pmod{n^4}.
  \end{equation}
If $n=p$ is a prime such that $p-1\nmid 2k-2$,
then the well  known congruence $S_{2k-2}(p)\equiv 0$ (mod $p$)
(see, e.g., \cite[the congruence (6.3)]{su1} or
 \cite[Thm.\ 1]{ms2}) and \eqref{3.4} yield the congruence \eqref{2.7}.
 Finally, \eqref{2.8} immediately follows reducing  \eqref{2.7} modulo
$p^2$ and using the previous fact that  $S_{2k}(p)\equiv 0$ (mod $p$)
whenever $p-1\nmid 2k$.
 \end{proof}
\begin{remark}
Applying a  result of Damianou and Schumer \cite[Thm.\ 2, p.\ 222]{ds} 
used in the proof of Corollary \ref{c1.2} to the congruence \eqref{3.4},
it follows that
      $$
2S_{2k+1}(n)\equiv  (2k+1)nS_{2k}(n)\pmod{n^4}
      $$
whenever $n$ is not divisible by any prime $p$ such that
$p\mid D_{2k-2}$, where $D_{2k-2}$ is the denominator  of the $(2k-2)$th  
Bernoulli number $B_{2k-2}$. The converse assertion is true if $n$ is 
relatively prime to the integer $k(1-4k^2)/3$. 
\end{remark}
 \begin{proof}[Proof of Corollary \ref{c2.6}] 
By Euler's theorem \cite{hw}, for all positive integers $m$ and $i$
such that  $1\le m&lt; p^4-p^3$ and $1\le i\le p-1$ we have 
   $1/i^m\equiv i^{\varphi(p^4)-m}$ (mod $p^4$),
where $\varphi(p^4)=p^4-p^3$ is the Euler's totient function.
Therefore, $R_m\equiv S_{p^4-p^3-m}$ (mod $p^4$).
Applying the last congruence for $m=2k-1$ and $m=2k$,
and substituting this into \eqref{2.7}  of Proposition \ref{p2.5}
 with $p^4-p^3-2k\ge 4$ instead of $2k$, we  immediately obtain 
  $$
2R_{2k-1}(p)\equiv (p^4-p^3-2k+1)pR_{2k}(p)\equiv
(1-2k)pR_{2k}(p)\pmod{p^{4}},
 $$
as desired.
  \end{proof}
\begin{proof}[Proof of Proposition \ref{p2.15}]  As 
$S_0(n)=n-1$ and $S_1(n)=(n-1)n/2$, Pascal's identity \eqref{1.2} yields
 \begin{equation}\label{3.5}\begin{split}
&amp;2(n^{2k+2}-1) =2\sum_{i=0}^{2k+1}{2k+2\choose i}S_{i}(n)\\
&amp;=2(n-1)(1+(k+1)n)+\sum_{i=1}^{k}\left(2{2k+2\choose 2i}S_{2i}(n)+
 2{2k+2\choose 2i+1}S_{2i+1}(n) \right).
   \end{split}\end{equation}
If $n$ is odd, then multiplying the congruence 
\eqref{1.6} of Theorem \ref{t1.1} by ${2k+2\choose 2i+1}$
and using  the identity ${2k+2\choose 2i+1}=
\frac{2k+2-2i}{2i+1}{2k+2\choose 2i}$, we find that
 \begin{equation}\label{3.6}\begin{split}
{2k+2\choose 2i+1}2S_{2i+1}(n)
&amp;\equiv \frac{2k+2-2i}{2i+1}{2k+2\choose 2i}(2i+1)nS_{2i}(n)\pmod{n^3}\\
&amp;= (2k+2-2i){2k+2\choose 2i}nS_{2i}(n)\pmod{n^3}
   \end{split}\end{equation}
for each $i=1,\ldots,k$.
Now substituting \eqref{3.6} into \eqref{3.5}, we obtain
\begin{equation}\label{3.7}
2(n-1)(1+(k+1)n)+2\sum_{i=1}^k(1+n(k+1-i)){2k+2\choose 2i}S_{2i}(n)
\equiv -2\pmod{n^3},
  \end{equation}
which is obviously the same as \eqref{2.15}.

If $n$ is even, then since  ${2k+2\choose 2i+1}$ is even (this is true 
by the identity ${2k+2\choose 2i+1}=\frac{2(k+1)}{2i+1}{2k+1\choose 2i}$),
we have   that ${2k+2\choose 2i+1}\frac{n^3}{2}\equiv 0$ (mod $n^3$).
This shows that \eqref{2.15} is satisfied for  even $n$ and each 
$i=1,\ldots,k$, and hence, proceeding in the same manner as in the previous 
case, we obtain \eqref{2.15}. 

Further, applying the identities $2i{2k+2\choose 2i}=(2k+2){2k+1\choose 2i-1}$
and ${2k+2\choose 2i}-{2k+1\choose 2i-1}={2k+1\choose 2i}$,
the left hand side of \eqref{2.16}  is equal to

\begin{equation*}\begin{split}
&amp;2(1+n(k+1))\sum_{i=0}^k{2k+2\choose 2i}S_{2i}(n)-
n\sum_{i=0}^k2i{2k+2\choose 2i}S_{2i}(n)\\
=&amp;2\sum_{i=0}^k{2k+2\choose 2i}S_{2i}(n)+2n(k+1)(n-1)+
2n(k+1)\sum_{i=1}^k{2k+2\choose 2i}S_{2i}(n)\\
&amp;-2n(k+1)\sum_{i=1}^k{2k+1\choose 2i-1}S_{2i}(n)\\
=&amp;2\sum_{i=0}^k{2k+2\choose 2i}S_{2i}(n)+2n(k+1)(n-1)\\
&amp;+2n(k+1)\sum_{i=1}^k\left({2k+2\choose 2i}- {2k+1\choose 2i-1}
\right)S_{2i}(n)\\
=&amp;2\sum_{i=0}^k{2k+2\choose 2i}S_{2i}(n)+2n(k+1)(n-1)+
2n(k+1)\sum_{i=1}^k{2k+1\choose 2i}S_{2i}(n)\\
=&amp;2\sum_{i=0}^k{2k+2\choose 2i}S_{2i}(n)+2n(k+1)
\sum_{i=0}^k{2k+1\choose 2i}S_{2i}(n)\\
=&amp;2\sum_{i=0}^k\left({2k+2\choose 2i}+n(k+1){2k+1\choose 2i}\right)S_{2i}(n).
  \end{split}
 \end{equation*}
Comparing the above equality with \eqref{2.15} immediately gives \eqref{2.16}.
  \end{proof}

  \begin{thebibliography}{999}
\bibitem{ag} T. Agoh, On Giuga's conjecture, {\it Manuscripta Math.} {\bf 87}
(1995), 501--510. 

\bibitem{agc}  W. R. Alford, A. Granville, and C. Pomerance, 
There are infinitely many Carmichael numbers, {\it Ann. of Math.}
{\bf 139}  (1994), 703--722.

\bibitem{bp} W. D. Banks and C. Pomerance,  On Carmichael
numbers in arithmetic progressions, 
{\it J. Aust. Math. Soc.} {\bf 88} (2010), 313--321.

\bibitem{be} A. F. Beardon, Sums of powers of integers,
{\it Amer. Math. Monthly} {\bf 103} (1996), 201--213. 

\bibitem{bed} E. Bedocchi, Nota ad una congettura sui numeri primi,
{\it Riv. Mat. Univ. Parma} {\bf 11} (1985), 229--236. 

\bibitem{ber} J. Bernoulli, {\it Ars Conjectandi}, Basel, 1713. 

\bibitem{bbb} D. Borwein, J. M. Borwein, P. B. Borwein, and
 R. Girgensohn, Giuga's conjecture on primality,
{\it Amer. Math. Monthly} {\bf 103} (1996), 40--50.  

\bibitem{bw}  J. M. Borwein and E. Wong, A survey of results relating
to Giuga's conjecture on primality, in    
{\it Proceedings of the $25$th Anniversary Conference of the Centre de 
R\'{e}cherches Math\'{e}matiques}, CECM Preprint Series, 
1995, 95-035: pp.\ 1--23. Available at 
\url{http://discerver.carma.newcastle.edu.au/101/}.  

\bibitem{bo} C. B. Boyer, Pascal's formula for the sums of powers of the 
integers, {\it Scripta Math.} {\bf 9} (1943), 237--244.

\bibitem{ca} L. Carlitz, The Staudt-Clausen theorem,
{\it  Math. Mag.} {\bf 34} (1960/1961), 131--146. 

\bibitem{ch} S. D. Chowla, A new proof of von Staudt's theorem,
{\it  J. Indian Math. Soc.} {\bf 16} (1926), 145--146. 

\bibitem{cl} T. Clausen, Lehrsatz aus einer Abhandlung \"{u}ber die
Bernoullischen Zahlen, {\it  Astron. Nach.} {\bf 17} (1840), 351--352. 

\bibitem{ds} P. Damianou and P. Schumer, 
A theorem involving the denominators of Bernoulli 
numbers, {\it Math. Mag.}  {\bf 76} (2003),  219--224.

\bibitem{dy} A. Dzhumadil'daev and D. Yeliussizov, 
Power sums of binomial coefficients, {\it J. Integer Seq.} {\bf 16} (2013), 
\href{https://cs.uwaterloo.ca/journals/JIS/VOL7/Sury/sury99.html}{Article 13.1.4}.

\bibitem{ed3} A. W. F. Edwards, A quick route to sums of powers, 
{\it Amer. Math. Monthly} {\bf 93} (1986), 451--455.

\bibitem{f} J. Faulhaber, {\it Academia Algebrae}, Darinnen die miraculosische
Inventiones zu den h\"{o}chsten Cossen  weiters continuirt 
und profitiert werden, Augspurg, bey Johann Ulrich Sc\"{o}nigs, 1631.

\bibitem{gmz} Y. Gallot, P. Moree, and W. Zudilin, The Erd\H{o}s-Moser equation 
$1^k+2^k+\cdots +(m-2)^k+(m-1)^k=m^k$ revisited using 
continued fractions, {\it Math. Comp.} {\bf 80} (2011), 1221--1237.

\bibitem{gi} G. Giuga, Su una presumibile propriet\`{a} caratteristica 
dei numeri primi, {\it Ist. Lombardo Sci. Lett. Rend. A} {\bf 83} (1950),
511--528.  

\bibitem{gkp} R. L. Graham, D. E. Knuth, and O. Patashnik, 
{\it Concrete Mathematics: A Foundation for Computer Science}, 
Addison-Wesley Publishing Company, 1989.

\bibitem{gm} J. M. Grau and A. M. Oller-Marc\'en, Generalizing 
Giuga's conjecture, preprint, \url{http://arXiv.org/abs/1103.3483}, 
2011.

\bibitem{glm} J. M. Grau, F. Luca, and A. M. Oller-Marc\'en, On a variant
of Giuga numbers, {\it Acta Math. Sin.} ({\it Engl. Ser.}) {\bf 28}
(2012), 653--660.
 
\bibitem{hw} G. H. Hardy and  E. M. Wright,
{\it An Introduction to the Theory of Numbers}, Clarendon Press, 1979.

\bibitem{ir} K. Ireland and M. Rosen, {\it A Classical Introduction to Modern 
Number Theory}, Springer-Verlag, 1982.

\bibitem{kel1} B. C. Kellner, \"{U}ber irregul\"{a}re Paare
h\"{o}herer Ordnungen, preprint, 
\url{http://www.bernoulli.org/~bk/irrpairord.pdf}, 2002.

\bibitem{kel2} B. C. Kellner, The equivalence of Giuga's and Agoh's 
conjectures, preprint, \url{http://arXiv.org/abs/math/0409259}, 2004.

\bibitem{kn} D. E. Knuth, Johan Faulhaber and sums of powers, 
{\it Math. Comp.}  {\bf 61} (1993),  277--294.

\bibitem{le} T. Lengyel, On divisibility of some power sums, 
{\it Integers}  {\bf 7} (2007),  A\# 41, 1--6.

\bibitem{lps} F. Luca, C. Pomerance, and I. Shparlinski, On Giuga numbers,
{\it Int. J. Mod. Math.} {\bf 4} (2009), 13--18.

\bibitem{ms2} K. MacMillan and J. Sondow, 
Proofs of power sum and binomial coefficient congruences 
via Pascal's identity, {\it Amer. Math. Monthly} {\bf 118} (2011), 549--552.
 
\bibitem{ms} K. MacMillan and J. Sondow, 
Divisibility of power sums and the generalized  Erd\H{o}s-Moser equation,
preprint, \url{http://arXiv.org/abs/1010.2275}, 2011.

\bibitem{mr} R. J. McIntosh and E. L. Roettger, A search for 
Fibonacci-Wieferich and Wolstenholme primes, {\it Math. Comp.} 
{\bf 76} (2007), 2087--2094.

\bibitem{me1} R. Me\v{s}trovi\'c, On the  mod $p^7$ determination of 
${2p-1\choose p-1}$, {\it Rocky Mountain J. Math.} {\bf 44} (2014), 633--648.

\bibitem{me3} R. Me\v{s}trovi\'c,  Wolstenholme's theorem: Its generalizations
and extensions in the last hundred and fifty years (1862--2012),
preprint,  \url{http://arXiv.org/abs/1111.3057}.

\bibitem{me2} R. Me\v{s}trovi\'c, Some identities in commutative 
rings with unity and their applications, submitted.

\bibitem{mo1} P. Moree,  On a theorem of Carlitz-von Staudt, {\it C. R. Math. 
Rep. Acad. Sci. Canada} {\bf 16} (1994), 166--170.

\bibitem{mo2} P. Moree,  Diophantine equations of 
Erd\H{o}s-Moser type, {\it Bull. Austral. Math. Soc.} {\bf 53} (1996), 
281--292.

\bibitem{mo3} P. Moree,  A top hat for Moser's 
four mathemagical rabbits, {\it Amer. Math. Monthly} {\bf 118} (2011), 
364--370.

\bibitem{mru} P. Moree, H. J. J. te Riele, and J. Urbanowicz,
Divisibility properties of integers $x,k$ satisfying
$1^k+\cdots +(x-1)^k=x^k$, {\it Math. Comp.} {\bf 63} (1994), 
799--815.

\bibitem{mos} L. Moser,  On the Diophantine equation 
$1^n+2^n+\cdots +(m-1)^n=m^n$, {\it Scripta Math.} {\bf 19} (1953), 84--88.

\bibitem{sc} H.J. Schultz, The sums of the $k$th powers of the first
$n$ integers, {\it Amer. Math. Monthly} {\bf 87} (1980), 478--481. 

\bibitem{sl} N. J. A. Sloane, {\it The On-Line Encyclopedia of Integer 
Sequences}, published electronically at \url{http://oeis.org}.

\bibitem{sm1}   J. Sondow and K. MacMillan, 
Reducing the Erd\H{o}s-Moser equation $1^n+2^n+\cdots +k^n=(k+1)^n$
modulo $k$ and $k^2$, {\it Integers} {\bf 11} (2011), \# A34, pages 8.

\bibitem{st} K. G. C. von Staudt, Beweis eines Lehrsatzes die 
Bernoulli'schen Zahlen betreffend,
{\it J. Reine Angew. Math.} {\bf 21} (1840), 372--374.

\bibitem{su} Z.-H. Sun, Congruences for Bernoulli numbers and Bernoulli
polynomials, {\it Discrete Math.} {\bf 163} (1997), 153--163.

\bibitem{su4} Z.-H. Sun, Congruences concerning Bernoulli numbers
and Bernoulli polynomials,  {\it Discrete Appl. Math.} {\bf 105} (2000),
193--223.

\bibitem{su1} Z.-H. Sun, Congruences involving Bernoulli polynomials,
{\it Discrete Math.} {\bf 308} (2008), 71--112.

\bibitem{su2} Z.-H. Sun, Congruences involving Bernoulli and Euler 
numbers, {\it J. Number Theory} {\bf 128} (2008), 280--312.

\bibitem{su3} Z.-W. Sun, General congruences for Bernoulli polynomials,
{\it Discrete Math.} {\bf 262} (2003), 253--276.

\bibitem{va} R. Vakil, {\it A Mathematical Mosaic}: {\it Patterns and
Problem Solving}, Brendan Kelly Pub., 1996.

\bibitem{w} E. Wong, {\it Computations on Normal Families of Primes}, 
MSc Thesis, Simon Fraser University, 1997. Available at  \\
\url{http://discerver.carma.newcastle.edu.au/view/year/1997.html}.
  \end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary  05A10; Secondary 11A07, 11A51, 11B50, 11B65, 11B68.

\noindent \emph{Keywords:} sum of powers, Bernoulli number,
Giuga's conjecture, Carlitz-von Staudt result, von Staudt-Clausen theorem.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000146},
\seqnum{A000217},
\seqnum{A000367},
\seqnum{A000928},
\seqnum{A002445},
\seqnum{A002997},
\seqnum{A007850},
\seqnum{A027641},
\seqnum{A027642},
\seqnum{A027762},
\seqnum{A029875},
\seqnum{A029876},
\seqnum{A046094},
\seqnum{A064538},
\seqnum{A079618},
\seqnum{A088164},
\seqnum{A165908},
\seqnum{A177783},
\seqnum{A198391},
\seqnum{A199767},
\seqnum{A219540}, and
\seqnum{A226365}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 25 2013; revised versions received
October 14 2013; October 22 2013; August 5 2014.
Published in {\it Journal of Integer Sequences}, August 5 2014.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in

  \end{document}

</pre></body></html>