Properties of Pell Numbers Modulo Prime Fermat Numbers 1 General
Total Page:16
File Type:pdf, Size:1020Kb
Properties of Pell numbers modulo prime Fermat numbers Tony Reix ([email protected]) 2005, ??th of February The Pell numbers are generated by the Lucas Sequence: 2 Xn = P Xn−1 QXn−2 with (P, Q)=(2, 1) and D = P 4Q = 8. There are: − − − The Pell Sequence: Un = 2Un−1 + Un−2 with (U0, U1)=(0, 1), and ◦ The Companion Pell Sequence: V = 2V + V with (V , V )=(2, 2). ◦ n n−1 n−2 0 1 The properties of Lucas Sequences (named from Edouard´ Lucas) are studied since hundreds of years. Paulo Ribenboim and H.C. Williams provided the properties of Lucas Sequences in their 2 famous books: ”The Little Book of Bigger Primes” (PR) and ”Edouard´ Lucas and Primality Testing” (HCW). The goal of this paper is to gather all known properties of Pell numbers in order to try proving a faster Primality test of Fermat numbers. Though these properties are detailed in the Ribenboim’s and Williams’ books, the special values of (P, Q) lead to new properties. Properties from Ribenboim’s book are noted: (PR). Properties from Williams’ book are noted: (HCW). Properties built by myself are noted: (TR). n -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 Un 5 -2 1 0 1 2 5 12 29 70 169 408 985 2378 Vn -14 6 -2 2 2 6 14 34 82 198 478 1154 2786 6726 Table 1: First Pell numbers 1 General properties of Pell numbers 1.1 The Little Book of Bigger Primes The polynomial X2 2X 1 has discriminant D = 8 and roots: − − α = 1 √2 β ± 1 So: α + β = 2 αβ = 1 − α β = 2√2 − and we define the sequences of numbers: αn βn U = − and V = αn + βn for n 0. n α β n ≥ − Hereafter, n and m represent any positive or negative integer. p represents a prime number. The properties provided by P. Ribenboim have been extended for negative values of n of Un and Vn : U =( 1)n+1U −n − n V =( 1)nV −n − n (PR) IV.1 Un = 2Un−1 + Un−2 U0 = 0, U1 = 1 Vn = 2Vn−1 + Vn−2 V0 = 2, V1 = 2 (PR) IV.2 U2n = UnVn V = V 2 2( 1)n 2n n − − (PR) IV.3 U = U V ( 1)nU m+n m n − − m−n V = V V ( 1)nV m+n m n − − m−n (PR) IV.4 Um+n = UmUn+1 + Um−1Un 2Vm+n = VmVn + 8UmUn (PR) IV.5 4U = V V n n+1 − n 4Un = Vn + Vn−1 8Un = Vn+1 + Vn−1 V = 2(U U ) n n+1 − n Vn = 2(Un + Un−1) Vn = Un+1 + Un−1 (PR) IV.6 U 2 = U U ( 1)n n n−1 n+1 − − V 2 = 4(2U 2 +( 1)n) or V 2 8U 2 =( 1)n4 n n − n − n − 2 (PR) IV.7 U V U V = 2( 1)nU m n − n m − m−n UmVn + UnVm = 2Um+n ⌊(n−1)/2⌋ n i (PR) IV.8 Un = i=0 2i+1 2 P ⌊n/2⌋ n i Vn = 2 i=0 2i 2 n− P 2 1 2n i n V2 = 2 i=0 2i 2 P (PR) IV.9 modd 23(m−1)/2U m = (m−1)/2 m ( 1)kiU k i=0 i − k(m−2i) P V m = (m−1)/2 m ( 1)kiV k i=0 i − k(m−2i) P m even 23m/2U m = m/2 m ( 1)(k+1)iV m ( 1)(k+1)m/2 k i=0 i − k(m−2i) − m/2 − P V m = m/2 m ( 1)kiV m ( 1)km/2 k i=0 i − k(m−2i) − m/2 − P (PR) IV.10 m odd U = (m+1)/2( 1)i+1V +( 1)(m+1)/2 m i=1 − m+1−2i − U = VP V + ... V 1 m m−1 − m−3 ± 0 ∓ ⌊(m+1)/4⌋ Um = 2 i=1 Vm+2−4i + 1 Um = 2(PVm−2 + Vm−6 + Vm−10 + ...) + 1 m even U = m/2( 1)i+1V m i=1 − m+1−2i U = VP V + ... V V m m−1 − m−3 ± 3 ∓ 1 m 0 (mod 4) U = 2 m/4 V ≡ m i=1 m+2−4i Um = 2(PVm−2 + Vm−6 + Vm−10 + ... + V2) m 2 (mod 4) U = 2( (m−2)/4 V + 1) ≡ m i=1 m+2−4i Um = 2(VPm−2 + Vm−6 + Vm−10 + ... + V4 + 1) modd 2m = (m−2)/2 m ( 1)iV + m ( 1)(m)/2 i=0 i − m−2i m/2 − 2m = VP m V + m V ... 2 m m − 1 m−2 2 m−4 − ± (m−1)/2 m even 2m = (m−1)/2 m ( 1)iV i=0 i − m−2i 2m = VP m V + m V ... m m − 1 m−2 2 m−4 − ± m/2 (PR) IV.11 ... 3 ( D/ ) ( D/ ) = +1 when p 1 (mod 8) p p ≡ ± ( D/ )= 1 when p 3 (mod 8) p − ≡ ± (PR) IV.13 U 23(p−1)/2U (mod p) kp ≡ k 3(p−1)e/2 U e 2 (mod p) p ≡ U ( D/ ) (mod p) p ≡ p (PR) IV.14 V 2 (mod p) p ≡ (PR) IV.15 n, k 1 U U ≥ n | kn (PR) IV.16 n, k 1, k odd V V ≥ n | kn ρ(p) n 2, if exists r 1 such that n U , thenρ(n) is the smallest such r. ≥ ≥ | r (PR) IV.18 U n (mod 2) n ≡ V 0 (mod 2) n ≡ ψ(p) ψ(p)= p ( 8/ ) − p (PR) IV.19 p 1 (mod 8) p U = U ≡ ± | ψ(p) p−1 ρ(p) ψ(p)= p 1 | − p 3 (mod 8) p U = U ≡ ± | ψ(p) p+1 ρ(p) ψ(p)= p + 1 | (PR) IV.20 e 1 such that pe U and pe+1 ∤ U ≥ | m m e+f if p ∤ k and f 1 then p U f ≥ | mkp (PR) IV.21 n U | λα,β(n) n U | ψα,β(n) (PR) IV.22 p 1 (mod 8) V /2 +1 (mod p) ≡ ± p−1 ≡ p 3 (mod 8) V /2 1 (mod p) ≡ ± p+1 ≡ − (PR) IV.23 p +1 (mod 8) p U ≡ | (p−1)/2 p +3 (mod 8) p V ≡ | (p+1)/2 p 3 (mod 8) p U ≡ − | (p+1)/2 p 1 (mod 8) p V ≡ − | (p−1)/2 4 (PR) IV.24 gcd(Un, Vn) = 1 or 2 (PR) IV.30 p 1 (mod 8) U U (mod p) ≡ ± n+p−1 ≡ n V V (mod p) n+p−1 ≡ n The period is: p 1. − p 3 (mod 8) e order of 1(mod p) ???? ≡ ± − U U (mod p) n+e(p+1) ≡ n V V (mod p) n+e(p+1) ≡ n The period is: e(p + 1). 1.2 Edouard´ Lucas and Primality Testing (HCW) 4.2.12 m-n even U 2 U 2 = U U m − n m+n m−n V 2 V 2 = 8U U m − n m+n m−n 2 2 m-n odd Um + Un = Um+nUm−n V 2 V 2 = 8U U m − n m+n m−n (HCW) 4.3.2 pλ = 2 , if pλ U , then pλ+1 U . 6 k n k pn (HCW) 4.2.3 2Um+n = UmVn + VmUn 2Vm+n = VmVn + 8UmUn (HCW) 4.2.5 V 2 8U 2 = 4( 1)n n − n − (HCW) 4.2.9 U = V U +( 1)nU m+n m n − m−n V = 8U U +( 1)nV m+n m n − m−n (HCW) 4.2.13 V 2 ( 1)m−nV 2 = 8(U 2 ( 1)m−nU 2) m − − n m − − n (HCW) 4.2.23 16U = V 2 V 2 2n n+1 − n−1 2U = U 2 U 2 2n n+1 − n−1 5 1.3 Other properties MathWorld The Pell Equation: x2 2y2 = 1 is linked with − the continued fraction: √2=[1, 2 ]. With: n 1, P = Q = 1,a = 2 , the solutions (p ,q ) ≥ n n n n n of: p2 2q2 = 1 are: n odd,p =(V )/2,q = U . n − n n n+1 n n+1 m () Vn(Vm(P, Q), Q )= Vnm(P, Q) n+1 ⌊ 2 ⌋ n−i n−2i (R. Ram) Un = 2 i=1 i−1 2 2 P 2 (R. Melham) Un + Un−1Un+1 = Vn /4 2 2 Vn + Vn−1Vn+1 = 16Un Binomials 1 0 <k<p p 0 (mod p) k ≡ 0 k<p p−1 ( 1)k (mod p) ≤ k ≡ − 1.4 New (?) properties n−1 (TR) ? 2Un = i=1 Vi P n−1 Vn =2+4 i=1 Ui P (TR) 1 Vn + Vn+1 = 4Un+1 V V = 4U n+1 − n n Proof: Use (PR) IV.5b and IV.1 . Same as (PR) IV.5 2 2 (TR) 2 Vn + Vn+1 = 8U2n+1 Proof: Use (PR) IV.2 and IV.5a . 2 2 (TR) 3 Un + Un+1 = U2n+1 Proof: Use (PR) IV.6a and IV.4a . 2 2 Vn + Vn+1 (TR) 4 2 2 = 8 Un + Un+1 Proof: Use (TR) 2 and 3 . (TR) 5 V + V = 8U U (n odd) (for m n) m+n m−n m n ≥ V + V = V V (n even) (for m n) m+n m−n m n ≥ Proof: Use (PR) IV.4b and IV.3b .