Let $p$ be a prime. In 1878 É. Lucas proved that the congruence $$ {p-1\choose k}\equiv (-1)^k\pmod{p}$$ holds for any nonnegative integer $k\in\{0,1,\ldots,p-1\}$. The converse statement was given in Problem 1494 of {\it Mathematics Magazine} proposed in 1997 by E. Deutsch and I.M. Gessel. In this note we generalize this converse assertion by the following result: If $n>1$ and $q>1$ are integers such that $$ {n-1\choose k}\equiv (-1)^k \pmod{q}$$ for every integer $k\in\{0,1,\ldots, n-1\}$, then $q$ is a prime and $n$ is a power of $q$.
We study new primality tests based on linear recurrent sequences of degree two exploiting a matricial approach. The classical Lucas test arises as a particular case and we see how it can be easily improved. Moreover, this approach shows clearly how the Lucas pseudoprimes are connected to the Pell equation and the Brahamagupta product. We also introduce a new specific primality test, which we will call generalized Pell test. We perform some numerical computations on the new primality tests and, for the generalized Pell test, we do not any pseudoprime up to $10^{10}$.
In 1876, Edouard Lucas showed that if an integer $b$ exists such that $b^{n-1} \equiv 1 (\mathrm{mod} \ n)$ and $b^{(n-1)/p} \not\equiv 1( \mathrm{mod} \ n)$ for all prime divisors $p$ of $n-1$ , then $n$ is prime, a result known as Lucas's converse of Fermat's little theorem. This result was considerably improved by Henry Pocklington in 1914 when he showed that it's not necessary to know all the prime factors of $n-1$ in order to determine if $n$ is prime. In this paper we optimize Pocklington's primality test for integers of the form $ap^{k}+1$ where $p$ is prime, $a<p$, $k\ge 1$. An extensi…
Using generalized binomial coefficients with respect to fundamental Lucas sequences we establish congruences that generalize the classical congruence of Wolstenholme and other related stronger congruences.
The Lucas-Lehmer (LL) primality test for Mersenne numbers is the fastest known primality test. In 1969, Hans Riesel published a modification of LL to test numbers of the form $N = h \cdot 2^n - 1$, where $h < 2^n$ is an odd integer and $n \ge 2$ \cite{Riesel}. This test is now known as the Lucas-Lehmer-Riesel (LLR) primality test. In Algorithm \ref{PrimalityAlgorithm}, we present a modification of LLR which works for any odd integer $N$. A probabilistic version of our algorithm runs in expected time $\tilde{O}(\log^3 N)$, and a deterministic version in expected $\tilde{O}(\log^4 N)$. We conclu…
We recall Charles Babbage's 1819 criterion for primality, based on simultaneous congruences for binomial coefficients, and extend it to a least-prime-factor test. We also prove a partial converse of his non-primality test, based on a single congruence. Two problems are posed. Along the way we encounter Bachet, Bernoulli, Bezout, Euler, Fermat, Kummer, Lagrange, Lucas, Vandermonde, Waring, Wilson, Wolstenholme, and several contemporary mathematicians.
The Baillie-PSW primality test combines Fermat and Lucas probable prime tests. It reports that a number is either composite or probably prime. No odd composite integer has been reported to pass this combination of primality tests if the parameters are chosen in an appropriate way. Here, we describe a significant strengthening of this test that comes at almost no additional computational cost. This is achieved by including in the test what we call Lucas-V pseudoprimes, of which there are only five less than $10^{15}$.
In this paper, we consider properties of coefficients of a generating functions composition, where the outer function is a logarithmic generating function and the inner function is an ordinary generating function with integer coefficients. Using notions of composita and composition of generating functions, we get new properties for this composition. The properties can be used for distinguishing prime numbers from composite numbers. As an application, obtained results can be used to obtain new primality criteria. We obtain primality criteria for the Mersenne numbers, the Lucas numbers, the Pell…
For each of the $15$ known sporadic Apéry-like sequences, we prove congruences modulo $p^2$ that are natural extensions of the Lucas congruences modulo $p$. This extends a result of Gessel for the numbers used by Apéry in his proof of the irrationality of $ζ(3)$. Moreover, we show that each of these sequences satisfies two-term supercongruences modulo $p^{2r}$. Using special constant term representations recently discovered by Gorodetsky, we prove these supercongruences in the two cases that remained previously open.
Let $P,Q\in\Bbb Z$, $U_0=0,\ U_1=1$ and $U_{n+1}=PU_n-QU_{n+1}$. In this paper we obtain a general congruence for $U_{kmn^r}/U_k\pmod {n^{r+1}}$, where $k,m,n,r$ are positive integers. As applications we extend Lucas' law of repetition and characterize the square prime factors of $a^n+1$ or $S_n$, where $\{S_n\}$ is given by $S_1=P^2+2$ and $S_{k+1}=S_k^2-2\ (k\ge 1)$.
We show that for any fixed base $a$, a positive proportion of primes have the property that they become composite after altering any one of their digits in the base $a$ expansion; the case $a=2$ was already established by Cohen-Selfridge and Sun, using some covering congruence ideas of Erdős. Our method is slightly different, using a partially covering set of congruences followed by an application of the Selberg sieve upper bound. As a consequence, it is not always possible to test whether a number is prime from its base $a$ expansion without reading all of its digits. We also present some sli…
In 1878 É. Lucas proved a remarkable result which provides a simple way to compute the binomial coefficient ${n\choose m}$ modulo a prime $p$ in terms of the binomial coefficients of the base-$p$ digits of $n$ and $m$: {\it If $p$ is a prime, $n=n_0+n_1p+\cdots +n_sp^s$ and $m=m_0+m_1p+\cdots +m_sp^s$ are the $p$-adic expansions of nonnegative integers $n$ and $m$, then \begin{equation*} {n\choose m}\equiv \prod_{i=0}^{s}{n_i\choose m_i}\pmod{p}. \end{equation*}} The above congruence, the so-called {\it Lucas' theorem} (or {\it Theorem of Lucas}), plays an important role in Number Theory and C…
We present a primality criterium based on congruences for cyclotomic polynomials, and point out a way to generalize our result in order to obtain a family of similar criteria. No practical use is aimed however.
In Wilson's Theorem the primality of a number hinges on a congruence. We present a similar test where the primality of a number m hinges, instead, on the indivisibility of 4(m-5)! by m. One implication of this theorem is a necessary and sufficient condition for two numbers to be twin primes, a result reminiscent of Clement's theorem but involving indivisibility. MSC: 11A41 and 11A51.
We observe that a sequence satisfies Lucas congruences modulo $p$ if and only if its values modulo $p$ can be described by a linear $p$-scheme, as introduced by Rowland and Zeilberger, with a single state. This simple observation suggests natural generalizations of the notion of Lucas congruences. To illustrate this point, we prove explicit generalized Lucas congruences for integer sequences that can be represented as the constant terms of $P(x,y)^n Q(x,y)$ where $P$ and $Q$ are certain Laurent polynomials.
In [16], we obtained some congruences for Lucas quotients of two infinite families of Lucas sequences by studying the combinatorial sum $$\sum_{k\equiv r(\mbox{mod}m)}{n\choose k}a^k.$$ In this paper, we show that the sum can be expressed in terms of some recurrent sequences with orders not exceeding $φ{(m)}$ and give some new congruences.
Let $p$ be a prime, and let $k,n,m,n_0$ and $m_0$ be nonnegative integers such that $k\ge 1$, and $_0$ and $m_0$ are both less than $p$. K. Davis and W. Webb established that for a prime $p\ge 5$ the following variation of Lucas' Theorem modulo prime powers holds $$ {np^k +n_0 \choose mp^k+m_0}\equiv{np^{\lfloor(k-1)/3\rfloor} \choose mp^{\lfloor(k-1)/3\rfloor}} {n_0 \choose m_0} \pmod{p^k}. $$ In the proof the authors used their earlier result that present a generalized version of Lucas' Theorem. In this paper we present a a simple inductive proof of the above congruence. Our proof is based o…
In this paper we obtain some congruences involving central binomial coefficients and Lucas sequences. For example, we show that if p>5 is a prime then $\sum_{k=0}^{p-1}F_k*binom(2k,k)/12^k$ is congruent to 0,1,-1 modulo p according as p=1,4 (mod 5), p=13,17 (mod 30), and p=7,23 (mod 30) respectively, where {F_n} is the Fibonacci sequence. We also raise several conjectures.
We develop a new method for proving algebraic independence of $G$-functions. Our approach rests on the following observation: $G$-functions do not always come with a single linear differential equation, but also sometimes with an infinite family of linear difference equations associated with the Frobenius that are obtained by reduction modulo prime ideals. When these linear difference equations have order one, the coefficients of the $G$-function satisfy congruences reminiscent of a classical theorem of Lucas on binomial coefficients. We use this to derive a Kolchin-like algebraic independence…
Let p be any prime and a be a positive integer. For nonnegative integers l,n and an integer r, the normalized cyclotomic $ψ$-coefficient $${n,r}_{l,p^a}:=p^{-[(n-p^{a-1}-lp^a)/(p^{a-1}(p-1))]} \sum_{k=r(mod p^a)}(-1)^k{n \choose k}{{(k-r)/p^a} \choose l}$$ is known to be an integer. In this paper, we show that this coefficient behaves like binomial coefficients and satisfies some Lucas-type congruences. This implies that a congruence of Wan is often optimal, and two conjectures of Sun and Davis are true.
In this paper, we study the combinatorial sum $$\sum_{k\equiv r(\mbox{mod }m)}{n\choose k}a^k.$$ By studying this sum, we obtain new congruences for Lucas quotients of two infinite families of Lucas sequences. Only for three Lucas sequences, there are such known results.
In this note we shall improve some congruences of D.F. Bailey [Two p^3 variations of Lucas' Theorem, JNT 35(1990), pp. 208-215] to higher prime power moduli, by studying the relation between irregular pairs of the form (p,p-3) and refined version of Wolstenholme's theorem.
Let $w_n=w_n(P,Q)$ be numerical sequences which satisfy the recursion relation \begin{equation*} w_{n+2}=Pw_{n+1}-Qw_n. \end{equation*} We consider two special cases $(w_0,w_1)=(0,1)$ and $(w_0,w_1)=(2,P)$ and we denote them by $U_n$ and $V_n$ respectively. Vieta-Lucas polynomial $V_n(X,1)$ is the polynomial of degree $n$. We show that the congruence equation $V_n(X,1)\equiv C \mod p$ has a solution if and only if $U_{(p-ε)/d}(C+2,C+2)$ is divisible by $p$, where $ε\in\{\pm 1\}$ depends on $C$ and $p$, and $d=\gcd(n,p-ε)$.
Let $q$ be an odd prime and $f(x)$, $g(x)$ be polynomials with integer coefficients. If the system of congruences $f(x) \equiv g(x) \equiv 0 \pmod{q}$ has $\ell$ solutions, then $R\left(f(x),g(x)\right)\equiv 0 \pmod{q^\ell}$, where $R\left(f(x),g(x)\right)$ is the resultant of the polynomials. Using this result we give new proofs of some known congruences involving the Lucas sequences.
In this paper, we confirm several conjectured congruences of Sun concerning the divisibility of binomial sums. For example, with help of a quadratic hypergeometric transformation, we prove that $$ \sum_{k=0}^{p-1}\binom{p-1}k\binom{2k}k^2\frac{P_k}{8^k}\equiv0\pmod{p^2} $$ for any prime $p\equiv 7\mod{8}$, where $P_k$ is the $k$-th Pell number. Further, we also propose three new congruences of the same type.
Let $f(z)$ be in $1+z\mathbb{Q}[[z]]$ and $\mathcal{S}$ be an infinite set of prime numbers such that, for all $p\in\mathcal{S}$, we can reduce $f(z)$ modulo $p$. We let $f(z)_{\mid p}$ denote the reduction of $f(z)$ modulo $p$. Generally, when $f(z)$ is D-finite, $f(z)_{\mid p}$ is algebraic over $\mathbb{F}_p(z)$. It turns out that if $f(z)$ is a solution of a polynomial of the form $X-A_p(z)X^{p^l}$, we can use this type of equations to obtain results of transcendence and algebraic independence over $\mathbb{Q}(z)$. In the present paper, we look for conditions on the differential operators …
In this paper, we look at numbers of the form $H_{r,k}:=F_{k-1}F_{r-k+2}+F_{k}F_{r-k}$. These numbers are the entries of a triangular array called the \emph{determinant Hosoya triangle} which we denote by ${\mathcal H}$. We discuss the divisibility properties of the above numbers and their primality. We give a small sieve of primes to illustrate the density of prime numbers in ${\mathcal H}$. Since the Fibonacci and Lucas numbers appear as entries in ${\mathcal H}$, our research is an extension of the classical questions concerning whether there are infinitely many Fibonacci or Lucas primes. W…
Let $p$ be an odd prime. In the paper we collect the author's various conjectures on congruences modulo $p$ or $p^2$, which are concerned with sums of binomial coefficients, Lucas sequences, power residues and special binary quadratic forms.
In this note we prove that {equation*} {np^s\choose mp^s+r}\equiv (-1)^{r-1}r^{-1}(m+1){n\choose m+1}p^s \pmod{p^{s+1}} {equation*} where $p$ is any prime, $n$, $m$, $s$ and $r$ are nonnegative integers such that $n\ge m$, $s\ge 1$, $1\le r\le p^s-1$ and $r$ is not divisible by $p$. We derive a proof by induction using a multiple application of Lucas' theorem and two basic binomial coefficient identities. As an application, we prove that a similar congruence for a prime $p\ge 5$ established in 1992 by D. F. Bailey holds for each prime $p$.
The classical congruences satisfied by the Fibonacci and Lucas sequences are reflected with the decomposition of primes in the ring generated by the gold number. This generalizes to establish a correspondence that we hope will be new between Chebotarev's theorem and the congruences satisfied by linear sequences. This link is done into the context of number field extensions. In particular we characterize primes ideals totally decomposed by simple congruences on the terms of linear recurrent sequences. Our results are illustrated by numerous examples, including Padovan sequencesof group $S_3$ an…
In this paper we prove three conjectures on congruences involving central binomial coefficients or Lucas sequences. Let $p$ be an odd prime and let $a$ be a positive integer. We show that if $p\equiv 1\pmod{4}$ or $a>1$ then $$ \sum_{k=0}^{\lfloor\frac34p^a\rfloor}\binom{-1/2}k\equiv\left(\frac{2}{p^a}\right)\pmod{p^2}, $$ where $(-)$ denotes the Jacobi symbol. This confirms a conjecture of the second author. We also confirm a conjecture of R. Tauraso by showing that $$\sum_{k=1}^{p-1}\frac{L_k}{k^2}\equiv0\pmod{p}\quad {\rm provided}\ \ p>5,$$ where the Lucas numbers $L_0,L_1,L_2,\ldots$ are …
In the present paper we obtain new upper bound estimates for the number of solutions of the congruence $$ x\equiv y r\pmod p;\quad x,y\in \mathbb{N},\quad x,y\le H,\quad r\in\cU, $$ for certain ranges of $H$ and $|\cU|$, where $\cU$ is a subset of the field of residue classes modulo $p$ having small multiplicative doubling. We then use this estimate to show that the number of solutions of the congruence $$ x^n\equiv λ\pmod p; \quad x\in \N, \quad L<x<L+p/n, $$ is at most $p^{\frac{1}{3}-c}$ uniformly over positive integers $n, λ$ and $L$, for some absolute constant $c>0$. This implies, in part…
Let p be any prime, and let a and n be nonnegative integers. Let $r\in Z$ and $f(x)\in Z[x]$. We establish the congruence $$p^{°f}\sum_{k=r(mod p^a)}\binom{n}{k}(-1)^k f((k-r)/p^a) =0 (mod p^{\sum_{i=a}^{\infty}[n/p^i]})$$ (motivated by a conjecture arising from algebraic topology), and obtain the following vast generalization of Lucas' theorem: If a is greater than one, and $l,s,t$ are nonnegative integers with $s,t<p$, then $$\frac{1}{[n/p^{a-1}]!} \sum_{k=r(mod p^a)} \binom{pn+s}{pk+t}(-1)^{pk}((k-r)/p^{a-1})^l =\frac {1}{[n/p^{a-1}]!} \sum_{k=r(mod p^a)}\binom{n}{k}\binom{s}{t}(-1)^k((k-r)…
In this paper we use the framework of automatic sequences to study combinatorial sequences modulo prime powers. Given a sequence whose generating function is the diagonal of a rational power series, we provide a method, based on work of Denef and Lipshitz, for computing a finite automaton for the sequence modulo $p^α$, for all but finitely many primes $p$. This method gives completely automatic proofs of known results, establishes a number of new theorems for well-known sequences, and allows us to resolve some conjectures regarding the Apéry numbers. We also give a second method, which applies…
Let $\Bbb Z$ be the set of integers, and let $(m,n)$ be the greatest common divisor of integers $m$ and $n$. Let $p\equiv 1\mod 4$ be a prime, $q\in\Bbb Z$, $2\nmid q$ and $p=c^2+d^2=x^2+qy^2$ with $c,d,x,y\in\Bbb Z$ and $c\e 1\mod 4$. Suppose that $(c,x+d)=1$ or $(d,x+c)$ is a power of 2. In the paper, by using the quartic reciprocity law we determine $q^{[p/8]}\mod p$ in terms of $c,d,x$ and $y$, where $[\cdot]$ is the greatest integer function. We also determine $\big(\frac{b+\sqrt{b^2+4^α}}2\big)^{\frac{p-1}4}\mod p$ for odd $b$ and $(2a+\sqrt{4a^2+1})^{\f{p-1}4}\mod p$ for $a\in\Bbb Z$. A…