Congruences of Finite Summations of the Coefficients in certain Generating Functions

In this paper we develop a general method to enumerate the congruences of finite summations ∑p−1 k=0 ak mk (mod p) and ∑p−1−h k=0 akak+h Bk (mod p) for the infinite sequence {an}n>0 with generating functions (1+xf(x)) N 2 , where f(x) is an integer polynomial and N is an odd integer with |N | < p. We also enumerate the congruences of some similar finite summations involving generating functions 1−αx− √ 1−2(α+β)x+Bx2 βx and 1−αx− √ 1−2αx+(α2−4β)x2 2βx2 .


Introduction
Let p be an odd prime number and m be an integer with m ≡ 0 (mod p).The initial topic of this article is to enumerate the congruence of the pth partial sum of the infinite sequence {a n } ∞ n=0 .The study of the congruence of a single term, a n (mod p), has a long history extending form the most famous and edge-old problem of Pascal's fractal, which is originally formed by the parities of binomial coefficients n k [5,6,13,14,15,16,19,25], to the most recent works about Apéry numbers [2,4,9,11,20], central Delannoy numbers [9], Catalan numbers [1,7,10,17,21], Motzkin numbers [7,9,18] and etc. [12].
This article focuses on the sequence {a n } ∞ n=0 with generating functions (GF's) (1 + xf (x)) N 2 , where f (x) is an integer polynomial and N is an odd integer with |N | < p.Neither a n nor a k m k in (1) is necessarily an integer if we deal with the field of rational numbers; therefore, we shall consider both a n and a k m k the congruences in the modular arithmetic field with modulus p.For instance, usually 1/2 k is a fraction; however, in the modular arithmetic field Z p = {0, 1, . . ., p − 1}, we have which is always an integer.For example let p = 5, and then /2! = −1 8 ≡ 3 (mod 5) = 3  2 .Z.-W.Sun [24] applied (2) and some other tools to verify the equivalence where c k is the kth Catalan number and • p denotes the Legendre symbol defined by if a is a quadratic nonresidue modulo p.
One has the following well-known and useful congruence: In [24], Sun also derived p−1 k=1 a k m k (mod p) for a k being the kth central Delannoy number or Schröder number respectively.The results by Sun initiate the motivation of our study.In this article, we wish to provide a systematic method to deal with the problems of this kind.
The article is organized as follows.In Section 2, we exam the problem in (1) by generating functions.As applications, similar problems of (1) involving generating functions modified from √ 1 + Ax + Bx 2 are given in Section 3. In Section 4, we focus on another type of problem p−1−h k=0 a k a k+h (±B) k (mod p).And then some applications are demonstrated in Sections 5 and 6.

GF's of the form
Let {a k } k 0 be the sequence associating with the generating function where f (x) is an integer polynomial and N is an odd integer with |N | < p.To formulate p−1 k=0 a k m k (mod p) and p−1 k=0 a k m k (mod p), which are same problem in different forms, we need the following facts: (ii) (iii) The reason for (i) is trivial and the congruence 0 in (ii) is due to that p+N 2 is an integer and k > p+N 2 .The reason for the first equivalence in (iii) is because of the bijection between {N, N − 2, • • • , N − 2p + 2} and {0, 1, . . .p − 1} under modulo p; however, the element N − 2i such that N − 2i ≡ 0 (mod p) is −p, and additionally 2 −p ≡ 2 −1 (mod p).The second equivalence in (iii) directly follows the first one.The advantage of (i) is that p+N 2 k is a normal binomial coefficient; therefore, we can apply In the following, the equivalence f (x) ≡ g(x) (mod h(x)) means that f (x) and g(x) share same residue with respect to divisor h(x).Moreover, f (x) ≡ g(x) (mod x q , p) indicates that the coefficients of f (x) and g(x) for the term x k , with k = 0, 1, . . ., q − 1, are congruent modulo p.
Theorem 1.Given an odd prime p and an integer m with m ≡ 0 (mod p).Let {a k } k 0 be a sequence of integers whose generating function is , where f (x) is an integer polynomial and N is an odd integer with |N | < p.We have (mod x p , p), and where E(x) is the polynomial consisting of each terms x t with t p in the expansion of Proof.Actually, ( 5) and ( 6) are equivalent.The following can prove both at the same time.
p−1 k=0 the electronic journal of combinatorics 21(2) (2014), #P2.45 Notice that the equivalence in ( 8) responses to modulus p by applying (i) and (ii), and the equation in ( 9) yields by modulus x p and that p+N 2 is an exponent of positive integer.The last equivalence is because of (4).Referring to ( 7) and ( 8) without substituting x = m, we then verify (5).
It takes time to enumerate E(x) unless f (x) is simple enough.In the rest of this section we assume f (x) = A + Bx.Let [x n ]g(x) denote the coefficient of x n in the power series g(x).We derive the following rules: For the precise value of q m , we can simply apply the following formula: Therefore, In case that E(x) = 0, we reach a particular case as follows.
(see [24]) A002457, in [22] 1, 6, 30, 140, 630, . . .m k , which will be used in the nest section.We need to enumerate two additional terms, ap m p and a p+1 m p+1 .Using (4), (i), (ii) and (iii), we calculate a p and a p+1 as follows: = 0 and referring (6).When B ≡ 0 (mod p) and N 1, then the larger N is, the more complicate E(x) is.However the two summations for N = 1 are also ready as follows.
Corollary 3. Let {a n } n 0 be the sequence whose generating function is

GF's modified from
Many well-known sequences are associated with generating functions modified from (1 + Ax + Bx 2 ) 1 2 .In this section, we consider two types: Proof.We still let {a n } n 0 associate with In particular, the last term in the last theorem is zero if B ≡ 0 (mod p) or B p = 1.This particular case happens for the Catalan numbers (see (3) and also [24,Lemma 2.1]), the large Schröder numbers (see [24,Theorem 1.2]) and the little Schröder numbers.

Now let
be the generating function of the sequence {d n } n 0 .For convenient, let A = −2α and B = α 2 − 4β.Lots of famous sequences have GF's of this form.For examples, (α, β) = (1, 1) yields the Motzkin number, and (3, 9) as well as (5,5) are associated with the numbers of Motzkin paths with multiple colors for level steps.Also (α, β) = (2, 1) creates a shifted Catalan number, (3, 2) a shifted little Schröder number [22, A001003], and (4, 1) the number of walks on cubic lattice starting and finishing on the horizontal plane but never going below it [22, A005572].For more examples, please refer to [3].The next result can be verified by a process similar to the proof of the last theorem.
Theorem 5. We have (mod p) and (S2) For convenience, we use ±B to denote B and −B simultaneously.
(See (r3) for the formula of q m .)Now we apply [x −h ]G(x)G( 1x ) to evaluate p−1 k=0 a k a k+h and also use the fact G(x) ≡ Q(x) (mod p, x p ) (see Theorem 1).
The first common term k p−h q k q k+h (±B) k can be avoided if and only if N −1 (see (r2) and (r3)).Now the result of (S2) is ready.
Particularly, if h is odd then the first term is 0, and if N −1 then the last term is 0.
Example 7. Let N = −1 and B = 1.For instances, 1−10x+x 2 is associated with the colored Delannoy paths, and is associated with the central coefficients of (1 + 7x + 12x 2 ).So p−h−1 k=0 (−1) k a k a k+h ≡ 0 (mod p) if h is odd; otherwise let p−h−1 = 2e and p−1 2 = M , and then p−h−1 k=0 (−1) k a k a k+h (mod p) is equivalent to We observe some applications here.Let be the generating function of {d n } n 0 .For convenience let A = −2α and B = α 2 − 4β.
Since d k−2 = − a k 2β (mod p) for k = 2, 3, . . ., p − 1, we have Before we apply the formula of p−1−h k=0 a k a k+h (±B) k given in the last section, let us recall the term k p−h q k q k+h (±B) k in both Theorems 6 and 8.With N = 1 we have k p−h q k q k+h (±B) k = q p−h qp (±B) p−h + q p−h+1 q p+1 (±B) p−h+1 .Notice that, the coefficients of (1 + Ax + Bx 2 ) M = q 0 + q 1 x + • • • + q 2M x 2M have a sort of symmetric property, i.e., B M −k q k = q 2M −k for k = 1, 2, . . ., 2M , which can be easily proved by induction on M .Let M = p+1 2 and we get Particularly, (mod p) is equivalent to Corollary 11.Let 2 h p − 3. We have which is a fixed number modulo any prime p > 2.

Table 1 :
p Some direct applications of Corollary 2