Int. J. Anal. Appl. (2023), 21:24 A Congruent Property of Gibonacci Number Modulo Prime Wipawee Tangjai∗, Kodchaphon Wanichang, Montathip Srikao, Punyanuch Kheawkrai Department of Mathematics, Faculty of Science, Mahasarakham University, Maha Sarakham, 44150, Thailand ∗Corresponding author: xvii.noo@gmail.com Abstract. Let a,b ∈ Z and p be a prime number such that a and b are not divisible by p. In this work, we give a congruent property modulo a prime number p of the gibonacci number defined by Gn = Gn−1 +Gn−2 with initial condition G1 = a,G2 = b. We show that a the gibonacci sequence satisfying G kp−(p5) ≡ Gk−1 (mod p) for all positive integer k and such odd prime p 6= 5 if and only if a ≡ b (mod p). Moreover, for each odd prime number p, we give a necessary and sufficient condition yielding G kp−(p5) ≡ Gk−1 (mod p). We also find a relation between the sequences in the same equivalent class in modulo 5 constructed by Aoki and Sakai [1] that leads to such congruent property. 1. Introduction The Fibonacci sequence {Fn}n≥0 satisfies the recurrence relation Fn = Fn−1 + Fn−2 with initial condition F0 = 0,F1 = 1 and the Lucas sequence {Ln}n≥0 satisfies the recurrence relation Ln = Ln−1 + Ln−2 with initial condition L0 = 2,L1 = 1. The sequences can be extended to a negative index as follows: for n ∈N F−n =(−1)n+1Fn, (1.1) L−n =(−1)nLn. (1.2) We see that both the Fibonacci and Lucas sequences satisfy the same recurrence relation with dif- ferent initial conditions. To generalized the mentioned sequences, the generalized Fibonacci sequence or gibonacci sequence {Gn}n>0 = {G(a,b)} ( [2], p.137) is defined to satisfy the recurrence relation Gn = Gn−1 +Gn−2, for n ≥ 3, with initial condition G1 = a and G2 = b, where a,b ∈Z. Received: Jan. 19, 2023. 2020 Mathematics Subject Classification. 11B37. Key words and phrases. generalized Fibonacci number; gibonacci number; Lucas number; modulo prime number. https://doi.org/10.28924/2291-8639-21-2023-24 ISSN: 2291-8639 © 2023 the author(s). https://doi.org/10.28924/2291-8639-21-2023-24 2 Int. J. Anal. Appl. (2023), 21:24 Theorem 1.1 ( [2], p.137). For an integer n ≥ 3, the n-th gibonacci number satisfies Gn = G1Fn−2 +G2Fn−1. Theorem 1.2 ( [2], p.137). For n ∈N, we have G−n =(−1)n+1(G1Fn+2 −G2Fn+1). The objective of this work is investigating the congruent property of the gibonacci sequence {Gn}= {G(a,b)} where a,b ∈Z that p 6 |a and p 6 |b analogous to the result from Andrica et. al. [3] appearing in Theorem 1.3. Throughout this article, we let p be an odd prime number and ( p 5 ) be the Legendre’s symbol. Theorem 1.3. [3] For a positive integer k and an odd prime number p 6=5, we have F kp−(p5) ≡ Fk−1 (mod p), L kp−(p5) ≡ Lk−1 (mod p). We note that Theorem 1.3 is not true when p = 5 as F10 6≡ F1 (mod 5). As a result, we give a necessary and sufficient condition in terms of the initial condition of the gibonacci sequence and its index k that lead to G pk−(p5) ≡ Gk−1 (mod p) (1.3) for each prime p characterized by the value of ( p 5 ) . We also give a necessary and sufficient condition resulting in (1.3) when ( p 5 ) = −1 in Theorem 3.1. In Theorem 3.2, we show that if ( p 5 ) = 1, then (1.3) holds for all positive integer k. By combining Theorems 3.1 and 3.2, we show that for a gibonacci sequence {Gn}n>0 = {G(a,b)}, (1.3) holds for all k ∈ N and for all odd prime number p 6= 5 where p 6 |a and p 6 |b if and only if a ≡ b (mod p) in Theorem 3.3. For the case that p =5, we consider the equivalent class X5 introduced by Aoki and Sakai [1]. For a prime number p, Aoki and Sakai constructed an equivalent class of the gibonacci sequences Xp = {{Gn}|{Gn} is the gibonacci sequence, where p 6 |G1 and p 6 |G2}/ ∼ where, {Gn}∼{G′n} if and only if G2G −1 1 ≡ G ′ 2G ′−1 1 (mod p), (1.4) and G−1 is the inverse of G modulo p where 1≤ G−1 < p. They also showed that Xp = {{G(1,k)}|1≤ k ≤ p−1}. (1.5) In Theorem 3.4, we consider the representation{G(1,h)}of each class in X5, where1≤ h ≤ 4and give a complete characterization of the initial conditions of a gibonacci sequences and the corresponding indices that (1.3) holds. Later in Theorems 3.5 and 3.6, we give a relation of the sequences in the same class in X5. Int. J. Anal. Appl. (2023), 21:24 3 p π(p) ( p 5 ) 3 8 -1 5 20 0 7 16 -1 11 10 1 13 28 -1 17 36 -1 19 18 1 23 48 -1 29 14 1 37 76 -1 43 88 -1 Table 1. List of the Pisono period and the Legendre’s symbol of a prime number. 2. Preliminaries In this section, we give an overview of the related work that will be used to prove the main results. For any positive integer m, the Pisano period [4] modulo m is the period of the Fibonacci number modulo m, denoted by π(m). In 2012, Gupta et. al, [5] gave a method to find a period of the Fibonacci number modulo a prime number. Theorem 2.1. [4] Let p be a prime number. • If p ≡±1 (mod 5), then π(p)|(p−1). • If p ≡±2 (mod 5), then π(p)|2(p+1). The values of π(p) and ( p 5 ) listed in Table 1 appear in [7] and [8], respectively. In Lemma 3.1, we show that the period of the gibonacci number modulo p is at most π(p) which leads to to computation appearing in Table 2. Lemma 2.1. [1] Let p be an odd prime number. The following statements are true. (1) If ( p 5 ) =1, then p 6 |Gn for any n ∈N. (2) If ( p 5 ) =−1, then p|Gn for some n ∈N. The following results are some identities of the Fibonacci and the Lucas sequences that will be used in this work. Theorem 2.2. ( [2], p. 93) For each n ∈N, Ln = Fn+1 +Fn−1, 5Fn = Ln+1 +Ln−1 4 Int. J. Anal. Appl. (2023), 21:24 Theorem 2.3. ( [2], p. 462) Lucas number is not divisible by 5. Theorem 2.4. [3] For an odd prime number p, a positive integer k and an integer r, the following holds: 2Fkp+r ≡ (p 5 ) FkLr +FrLk (mod p), (2.1) 2Lkp+r ≡ 5 (p 5 ) FkFr +LkLr (mod p). (2.2) The following corollary is a direct result of Theorem 2.4. Corollary 2.1. For a positive integer k and r, we have F5k−r ≡ 3F−rLk (mod 5), (2.3) L5k ≡ Lk (mod 5). (2.4) Theorem 2.5. [3] For an odd prime number p and a positive integer k, we have Fkp ≡ (p 5 ) Fk (mod p), Fp ≡ (p 5 ) (mod p), F p−(p5) ≡ 0 (mod p). Theorem 2.6. [6] Let n,k ∈Z. If k is an even number, then Fn+k +Fn−k = FnLk, (2.5) Fn+k −Fn−k = FkLn. (2.6) If k is an odd number, then Fn+k +Fn−k = FkLn, (2.7) Fn+k −Fn−k = FnLk. (2.8) 3. Main Results The following property of the gibonacci sequence can be obtained directly from Theorem 1.1; however, the authors do not find this result in the literature review. Lemma 3.1. Let {Gn}n>0 = {G(a,b)}, where a,b ∈Z. For k,r ∈Z, we have Gkπ(p)+r ≡ Gr (mod p) Int. J. Anal. Appl. (2023), 21:24 5 Proof. By Theorem 1.1, we have that Gkπ(p)+r ≡ G1Fkπ(p)+r−2 +G2Fkπ(p)+r−1 (mod p) ≡ G1Fr−2 +G2Fr−1 (mod p) ≡ Gr (mod p). � Next, we consider each case of an odd prime p characterized by the value of ( p 5 ) and give a necessary and sufficient condition resulting to G pk−(p5) ≡ Gk−1 (mod p). Theorem 3.1. Let p be an odd prime number that ( p 5 ) =−1 and {Gn}n>0 = {G(a,b)} be such that a and b are not divisible by p. For k ∈ N, we have that G pk−(p5) ≡ Gk−1 (mod p) if and only if one of the following holds: (1) G1 ≡ G2 (mod p), (2) Lk−1 ≡ 0 (mod p). Proof. By Theorems 1.1, 1.3, 2.4, 2.5 and 2.6, we have G pk−(p5) = Gpk+1 = aFpk−1 +bFpk ≡ 2−1a(−FkL−1 +F−1Lk)−bFk (mod p) ≡ aFk+1 −bFk (mod p). (3.1) It follows from Theorem 2.2 that G pk−(p5) −Gk−1 ≡ a(Fk+1 −Fk−3)−b(Fk −Fk−2) (mod p) ≡ (a−b)Lk−1 (mod p). Hence, G pk−(p5) ≡ Gk−1 (mod p) if and only if a ≡ b (mod p) or Lk−1 ≡ 0 (mod p). � By Theorem 3.1, the listed p and k in Table 2 yield G pk−(p5) ≡ Gk−1 (mod p). Corollary 3.1. Let p be an odd prime number where ( p 5 ) = −1 and {Gn}n>0 = {G(a,b)} where a and b are integers that are not divisible by p. Then G pk−(p5) ≡ Gk−1 (mod p) for all k ∈ N if and only if a ≡ b (mod p). We note that, by (3.1), if {Gn}n>0 = {G(1,h)} where 1≤ h ≤ p−1, then G pk−(p5) ≡ (Fk+1 +Fk−1)− (Fk−1 +hFk)≡ Lk −Gk+1 (mod p). (3.2) Hence, if ( p 5 ) =−1, then G pk−(p5) +G k−(p5) ≡ Lk (mod p). (3.3) 6 Int. J. Anal. Appl. (2023), 21:24 Prime p k (mod π(p)) 3 3 (mod 8) 7 (mod 8) 7 5 (mod 16) 13 (mod 16) 13 - 17 - 23 13 (mod 48) 37 (mod 48) 37 - 43 23 (mod 88) 67 (mod 88) Table 2. List of p and k where ( p 5 ) =−1 and p|Lk−1. Theorem 3.2. Let p be an odd prime number and {Gn}n>0 = {G(a,b)} where a and b are integers that are not divisible by p. If ( p 5 ) =1, then G pk−(p5) ≡ Gk−1 (mod p), for all k ∈N. Proof. By Theorem 1.1, 2.4 and 2.6, it follows that G pk−(p5) = Gpk−1 = aFpk−3 +bFpk−2 ≡ 2−1a(FkL−3 +F−3Lk)+2−1b(FkL−2 +F−2Lk) (mod p) ≡ aFk−3 +bFk−2 (mod p) ≡ Gk−1 (mod p). This completes the proof. � Corollary 3.2. If p is an odd prime number such that ( p 5 ) = 1, then G pik−(p5) ≡ Gk−1 (mod p), for all i,k ∈N. The following theorem is a direct result of Theorems 3.1 and 3.2. Theorem 3.3. Let {Gn}n>0 = {G(a,b)} be such that a,b ∈ Z. Then Gpk−(p5) ≡ Gk−1 (mod p) for all positive integers k and odd prime numbers p 6=5 such that p 6 |a, p 6 |b if and only if a ≡ b mod p. Next, we consider the case that p =5. Firstly, in Theorem 3.4, we give a complete characterization of the initial condition of the gibonacci sequence {Gn}n>0 = {G(1,h)} where 1≤ h ≤ 4 and the values of k where (1.3) holds. Then, we give a relation of such congruent property of the sequences in the same equivalent class in X5. Int. J. Anal. Appl. (2023), 21:24 7 Theorem 3.4. Let {Gn}n>0 = {G(1,h)} be such that 1 ≤ h ≤ 4. If p = 5 and k ∈ N, then G pk−(p5) ≡ Gk−1 (mod p) if and only if one of the following holds: (1) {Gn}= {G(1,4)} and k ≡ 0 (mod 5) (2) {Gn}= {G(1,1)} and k ≡ 1 (mod 5) (3) {Gn}= {G(1,2)} and k ≡ 3 (mod 5). Proof. Since p =5, we have ( p 5 ) =0. By Theorem 1.1, we have G pk−(p5) = G5k = F5k−2 +hF5k−1. (3.4) Let q,r ∈Z be such that k =5q + r, where 0≤ r ≤ 4. By Corollary 2.1 and (3.4), G5k ≡ F5k−2 +hF5k−1 (mod 5) ≡ 3(F−2L5k +hF−1L5k) (mod 5) ≡ 3(−L5k +hL5k) (mod 5) ≡ 3Lk(−1+h) (mod 5) ≡ 3(−1+h)L5q+r (mod 5) ≡ 3(−1+h)2−1LqLr (mod 5), by Theorem 2.4, ≡ (1−h)LqLr (mod 5). Similarly Gk−1 ≡ Fk−3 +hFk−2 (mod 5) ≡ F5q+r−3 +hF5q+r−2 (mod 5) ≡ 2−1 (Fr−3L5q +hFr−2L5q) (mod 5) ≡ 3Lq(Fr−3 +hFr−2) (mod 5). Thus G5k ≡ Gk−1 (mod 5) if and only if (1−h)LqLr ≡ 3Lq(Fr−3 +hFr−2) (mod 5). By Theorem 2.3, we have (1−h)Lr ≡ 3(Fr−3 +hFr−2) (mod 5). (3.5) If r = 4, then (3.5) does not hold. By a direct computation 5 6 |(3Fr−2 +Lr) for all r ∈ {0,1,2,3}, we have h ≡ (3Fr−2 +Lr)−1(Lr −3Fr−3) (mod 5). (3.6) If r = 2, then h ≡ 0 (mod 5) contradiction. By a direct computation, the above equation holds if and only if (r,h)∈{(0,4),(1,1),(3,2)}. This completes the proof. � 8 Int. J. Anal. Appl. (2023), 21:24 For {Gn}n>0 = {G(a,b)} where a,b ∈Z that a and b are not divisible by p, let δ(a)=   0 if a ≡ 1,4 (mod 5) −1 if a ≡ 2 (mod 5) 1 if a ≡ 3 (mod 5). Theorem 3.5. Let {Gn}n>0 = {G(1,h)} and {G′n}n>0 = {G(a,b)}, where 1 ≤ h ≤ 4 and a,b ∈ Z be such that {Gn}∼{G′n}. Then G′k ≡ a −1Gk +δ(a)Fk−2 (mod 5) for all k ∈N. Proof. Since {Gn} ∼ {G′n}, we have b ≡ G′2G −1 1 ≡ G2(G ′ 1) −1 ≡ ha−1 (mod 5). For the case that k =1,2, we can compute the result directly. For k > 2, we have G′k ≡ aFk−2 +bFk−1 (mod 5) ≡ aFk−2 +ha−1Fk−1 (mod 5). If a ≡ 1 (mod 5) or a ≡ 4 (mod 5), then a ≡ a−1 (mod 5). Hence, G′k ≡ a −1Gk (mod 5). (3.7) Otherwise, G′k ≡  a −1Gk −Fk−2 if G′1 ≡ 2 (mod 5), a−1Gk +Fk−2 if G′1 ≡ 3 (mod 5). Therefore, we have G′k ≡ a −1Gk +δ(a)Fk−2 (mod 5) for all positive integer k. � Theorem 3.6. Let {Gn}n>0 = {G(1,h)} where 1 ≤ h ≤ 4 and k be a positive integer satisfying G5k ≡ Gk−1 (mod 5). Let {G′n}n>0 = {G(a,b)} be such that a and b are integers that are not divisible by 5. If {Gn}∼{G′n} in X5, then G′5k ≡ G ′ k−1 (mod 5) if and only if a ≡ a −1 (mod 5). Proof. Let δ = δ(a). So G′5k −G ′ k−1 ≡ ( a−1G5k +δF5k−2 ) − ( a−1Gk−1 +δFk−3 ) (mod 5) ≡ a−1(G5k −Gk−1)+δ(F5k−2 −Fk−3) (mod 5) ≡ a−1(G5k −Gk−1)+δ(3F−2Lk −Fk−3) (mod 5) ≡ a−1(G5k −Gk−1)+δ(3(Fk−2 −Fk+2)−Fk−3) (mod 5) ≡ a−1(G5k −Gk−1)+δ(3((Fk −Fk−1)− (Fk+1 +Fk))−Fk−3) (mod 5) ≡ a−1(G5k −Gk−1)+δ(2(Fk−1 +Fk+1)− (Fk−1 −Fk−2)) (mod 5) ≡ a−1(G5k −Gk−1)+δFk+3 (mod 5). Since G5k ≡ Gk−1 (mod 5), it follows that G′5k ≡ G ′ k−1 (mod 5) if and only if 5|δFk+3. So δ =0 or k ≡ 2 (mod 5). By Theorem 3.4, since G5k ≡ Gk−1 (mod 5), we have that k 6≡ 2 (mod 5). Hence δ =0 and it follows that a ≡ a−1 (mod 5). So the equation holds if and only if a ≡ a−1 (mod 5). � Int. J. Anal. Appl. (2023), 21:24 9 By Theorem 3.4 and 3.6, we have the following corollaries. Corollary 3.3. Let {Gn} = {G(1,h)} where 1 ≤ h ≤ 4. Let {G′n} = {G(a,b)} be such that {Gn} ∼ {G′n}, where a,b ∈ Z and G′1 ≡ 1,4 (mod 5). If (h,r) ∈ {(4,0),(1,1),(2,3)} where k ≡ r (mod 5) and 0≤ r ≤ 4, then we have G′5k ≡ G ′ k−1 (mod 5). Corollary 3.4. Let {Gn} = {G(1,h)} where 1 ≤ h ≤ 4. Let {G′n} = {G(a,b)} be such that {Gn} ∼ {G′n}, where where a,b ∈ Z and G′1 ≡ 2,3 (mod 5). If (h,r) ∈ {(4,0),(1,1),(2,3)} where k ≡ r (mod 5) and 0≤ r ≤ 4, then we have G′5k 6≡ G ′ k−1 (mod 5). Acknowledgement: This project is financially supported by Faculty of Science, Mahasarakham Uni- versity 2017. Conflicts of Interest: The authors declare that there are no conflicts of interest regarding the publi- cation of this paper. References [1] M. Aoki, Y. Sakai, On Divisibility of Generalized Fibonacci Number, Integers, 15 (2015), A31. [2] T. Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley & Sons, Ltd, New Jersey, (2017). [3] D. Andrica, V. Crişan, F. Al-Thukair, On Fibonacci and Lucas Sequences Modulo a Prime and Primality Testing, Arab J. Math. Sci. 24 (2018), 9–15. https://doi.org/10.1016/j.ajmsc.2017.06.002. [4] J.D. Fulton, W.L. Morris, On Arithmetical Functions Related to the Fibonacci Numbers, Acta Arithmetica, 16 (1969), 105–110. [5] S. Gupta, P. Rockstroh, F.E. Su, Splitting Fields and Periods of Fibonacci Sequences Modulo Primes, Math. Mag. 85 (2012), 130-135. https://doi.org/10.4169/math.mag.85.2.130. [6] H. London, Fibonacci and Lucas Numbers, by Verner E. Hoggatt Jr. Houghton Mifflin Company, Boston, 1969. Canadian Math. Bull. 12 (1969), 367–367. https://doi.org/10.1017/S0008439500030514. [7] N.J.A. Sloan, The On-Line Encyclopedia of Integer Sequences, http://oeis.org/A001175. [8] J. Sondow, The On-Line Encyclopedia of Integer Sequences, https://oeis.org/A237437. https://doi.org/10.1016/j.ajmsc.2017.06.002 https://doi.org/10.4169/math.mag.85.2.130 https://doi.org/10.1017/S0008439500030514 http://oeis.org/A001175 https://oeis.org/A237437 1. Introduction 2. Preliminaries 3. Main Results References