Metamath Proof Explorer


Theorem fmtnoprmfac2

Description: Divisor of Fermat number (special form of Lucas' result, see fmtnofac2 ): Let F_n be a Fermat number. Let p be a prime divisor of F_n. Then p is in the form: k*2^(n+2)+1 where k is a positive integer. (Contributed by AV, 26-Jul-2021)

Ref Expression
Assertion fmtnoprmfac2 N 2 P P FermatNo N k P = k 2 N + 2 + 1

Proof

Step Hyp Ref Expression
1 breq1 P = 2 P FermatNo N 2 FermatNo N
2 1 adantr P = 2 N 2 P FermatNo N 2 FermatNo N
3 eluzge2nn0 N 2 N 0
4 fmtnoodd N 0 ¬ 2 FermatNo N
5 3 4 syl N 2 ¬ 2 FermatNo N
6 5 adantl P = 2 N 2 ¬ 2 FermatNo N
7 6 pm2.21d P = 2 N 2 2 FermatNo N k P = k 2 N + 2 + 1
8 2 7 sylbid P = 2 N 2 P FermatNo N k P = k 2 N + 2 + 1
9 8 a1d P = 2 N 2 P P FermatNo N k P = k 2 N + 2 + 1
10 9 ex P = 2 N 2 P P FermatNo N k P = k 2 N + 2 + 1
11 10 3impd P = 2 N 2 P P FermatNo N k P = k 2 N + 2 + 1
12 simpr1 ¬ P = 2 N 2 P P FermatNo N N 2
13 neqne ¬ P = 2 P 2
14 13 anim2i P ¬ P = 2 P P 2
15 eldifsn P 2 P P 2
16 14 15 sylibr P ¬ P = 2 P 2
17 16 ex P ¬ P = 2 P 2
18 17 3ad2ant2 N 2 P P FermatNo N ¬ P = 2 P 2
19 18 impcom ¬ P = 2 N 2 P P FermatNo N P 2
20 simpr3 ¬ P = 2 N 2 P P FermatNo N P FermatNo N
21 fmtnoprmfac2lem1 N 2 P 2 P FermatNo N 2 P 1 2 mod P = 1
22 12 19 20 21 syl3anc ¬ P = 2 N 2 P P FermatNo N 2 P 1 2 mod P = 1
23 simpl P ¬ P = 2 P
24 2nn 2
25 24 a1i P ¬ P = 2 2
26 oddprm P 2 P 1 2
27 16 26 syl P ¬ P = 2 P 1 2
28 27 nnnn0d P ¬ P = 2 P 1 2 0
29 25 28 nnexpcld P ¬ P = 2 2 P 1 2
30 29 nnzd P ¬ P = 2 2 P 1 2
31 23 30 jca P ¬ P = 2 P 2 P 1 2
32 31 ex P ¬ P = 2 P 2 P 1 2
33 32 3ad2ant2 N 2 P P FermatNo N ¬ P = 2 P 2 P 1 2
34 33 impcom ¬ P = 2 N 2 P P FermatNo N P 2 P 1 2
35 modprm1div P 2 P 1 2 2 P 1 2 mod P = 1 P 2 P 1 2 1
36 34 35 syl ¬ P = 2 N 2 P P FermatNo N 2 P 1 2 mod P = 1 P 2 P 1 2 1
37 prmnn P P
38 37 adantr P ¬ P = 2 P
39 2z 2
40 39 a1i P ¬ P = 2 2
41 13 necomd ¬ P = 2 2 P
42 41 adantl P ¬ P = 2 2 P
43 2prm 2
44 43 a1i ¬ P = 2 2
45 44 anim2i P ¬ P = 2 P 2
46 45 ancomd P ¬ P = 2 2 P
47 prmrp 2 P 2 gcd P = 1 2 P
48 46 47 syl P ¬ P = 2 2 gcd P = 1 2 P
49 42 48 mpbird P ¬ P = 2 2 gcd P = 1
50 38 40 49 3jca P ¬ P = 2 P 2 2 gcd P = 1
51 50 28 jca P ¬ P = 2 P 2 2 gcd P = 1 P 1 2 0
52 51 ex P ¬ P = 2 P 2 2 gcd P = 1 P 1 2 0
53 52 3ad2ant2 N 2 P P FermatNo N ¬ P = 2 P 2 2 gcd P = 1 P 1 2 0
54 53 impcom ¬ P = 2 N 2 P P FermatNo N P 2 2 gcd P = 1 P 1 2 0
55 odzdvds P 2 2 gcd P = 1 P 1 2 0 P 2 P 1 2 1 od P 2 P 1 2
56 54 55 syl ¬ P = 2 N 2 P P FermatNo N P 2 P 1 2 1 od P 2 P 1 2
57 eluz2nn N 2 N
58 57 3ad2ant1 N 2 P P FermatNo N N
59 58 adantl ¬ P = 2 N 2 P P FermatNo N N
60 fmtnoprmfac1lem N P 2 P FermatNo N od P 2 = 2 N + 1
61 59 19 20 60 syl3anc ¬ P = 2 N 2 P P FermatNo N od P 2 = 2 N + 1
62 breq1 od P 2 = 2 N + 1 od P 2 P 1 2 2 N + 1 P 1 2
63 62 adantl ¬ P = 2 N 2 P P FermatNo N od P 2 = 2 N + 1 od P 2 P 1 2 2 N + 1 P 1 2
64 24 a1i N 2 2
65 peano2nn N N + 1
66 57 65 syl N 2 N + 1
67 66 nnnn0d N 2 N + 1 0
68 64 67 nnexpcld N 2 2 N + 1
69 nndivides 2 N + 1 P 1 2 2 N + 1 P 1 2 k k 2 N + 1 = P 1 2
70 68 27 69 syl2an N 2 P ¬ P = 2 2 N + 1 P 1 2 k k 2 N + 1 = P 1 2
71 eqcom k 2 N + 1 = P 1 2 P 1 2 = k 2 N + 1
72 71 a1i N 2 P k k 2 N + 1 = P 1 2 P 1 2 = k 2 N + 1
73 37 nncnd P P
74 peano2cnm P P 1
75 73 74 syl P P 1
76 75 adantl N 2 P P 1
77 76 adantr N 2 P k P 1
78 simpr N 2 P k k
79 68 ad2antrr N 2 P k 2 N + 1
80 78 79 nnmulcld N 2 P k k 2 N + 1
81 80 nncnd N 2 P k k 2 N + 1
82 2cnne0 2 2 0
83 82 a1i N 2 P k 2 2 0
84 divmul3 P 1 k 2 N + 1 2 2 0 P 1 2 = k 2 N + 1 P 1 = k 2 N + 1 2
85 77 81 83 84 syl3anc N 2 P k P 1 2 = k 2 N + 1 P 1 = k 2 N + 1 2
86 nncn k k
87 86 adantl N 2 P k k
88 68 nncnd N 2 2 N + 1
89 88 ad2antrr N 2 P k 2 N + 1
90 2cnd N 2 P k 2
91 87 89 90 mulassd N 2 P k k 2 N + 1 2 = k 2 N + 1 2
92 2cnd N 2
93 65 nnnn0d N N + 1 0
94 92 93 expp1d N 2 N + 1 + 1 = 2 N + 1 2
95 nncn N N
96 add1p1 N N + 1 + 1 = N + 2
97 95 96 syl N N + 1 + 1 = N + 2
98 97 oveq2d N 2 N + 1 + 1 = 2 N + 2
99 94 98 eqtr3d N 2 N + 1 2 = 2 N + 2
100 57 99 syl N 2 2 N + 1 2 = 2 N + 2
101 100 ad2antrr N 2 P k 2 N + 1 2 = 2 N + 2
102 101 oveq2d N 2 P k k 2 N + 1 2 = k 2 N + 2
103 91 102 eqtrd N 2 P k k 2 N + 1 2 = k 2 N + 2
104 103 eqeq2d N 2 P k P 1 = k 2 N + 1 2 P 1 = k 2 N + 2
105 73 adantl N 2 P P
106 105 adantr N 2 P k P
107 1cnd N 2 P k 1
108 id N N
109 24 a1i N 2
110 108 109 nnaddcld N N + 2
111 110 nnnn0d N N + 2 0
112 57 111 syl N 2 N + 2 0
113 64 112 nnexpcld N 2 2 N + 2
114 113 nncnd N 2 2 N + 2
115 114 ad2antrr N 2 P k 2 N + 2
116 87 115 mulcld N 2 P k k 2 N + 2
117 106 107 116 subadd2d N 2 P k P 1 = k 2 N + 2 k 2 N + 2 + 1 = P
118 eqcom k 2 N + 2 + 1 = P P = k 2 N + 2 + 1
119 118 a1i N 2 P k k 2 N + 2 + 1 = P P = k 2 N + 2 + 1
120 104 117 119 3bitrd N 2 P k P 1 = k 2 N + 1 2 P = k 2 N + 2 + 1
121 72 85 120 3bitrd N 2 P k k 2 N + 1 = P 1 2 P = k 2 N + 2 + 1
122 121 rexbidva N 2 P k k 2 N + 1 = P 1 2 k P = k 2 N + 2 + 1
123 122 biimpd N 2 P k k 2 N + 1 = P 1 2 k P = k 2 N + 2 + 1
124 123 adantrr N 2 P ¬ P = 2 k k 2 N + 1 = P 1 2 k P = k 2 N + 2 + 1
125 70 124 sylbid N 2 P ¬ P = 2 2 N + 1 P 1 2 k P = k 2 N + 2 + 1
126 125 expr N 2 P ¬ P = 2 2 N + 1 P 1 2 k P = k 2 N + 2 + 1
127 126 3adant3 N 2 P P FermatNo N ¬ P = 2 2 N + 1 P 1 2 k P = k 2 N + 2 + 1
128 127 impcom ¬ P = 2 N 2 P P FermatNo N 2 N + 1 P 1 2 k P = k 2 N + 2 + 1
129 128 adantr ¬ P = 2 N 2 P P FermatNo N od P 2 = 2 N + 1 2 N + 1 P 1 2 k P = k 2 N + 2 + 1
130 63 129 sylbid ¬ P = 2 N 2 P P FermatNo N od P 2 = 2 N + 1 od P 2 P 1 2 k P = k 2 N + 2 + 1
131 130 ex ¬ P = 2 N 2 P P FermatNo N od P 2 = 2 N + 1 od P 2 P 1 2 k P = k 2 N + 2 + 1
132 61 131 mpd ¬ P = 2 N 2 P P FermatNo N od P 2 P 1 2 k P = k 2 N + 2 + 1
133 56 132 sylbid ¬ P = 2 N 2 P P FermatNo N P 2 P 1 2 1 k P = k 2 N + 2 + 1
134 36 133 sylbid ¬ P = 2 N 2 P P FermatNo N 2 P 1 2 mod P = 1 k P = k 2 N + 2 + 1
135 22 134 mpd ¬ P = 2 N 2 P P FermatNo N k P = k 2 N + 2 + 1
136 135 ex ¬ P = 2 N 2 P P FermatNo N k P = k 2 N + 2 + 1
137 11 136 pm2.61i N 2 P P FermatNo N k P = k 2 N + 2 + 1