Metamath Proof Explorer


Theorem fmtnorec4

Description: The fourth recurrence relation for Fermat numbers, see Wikipedia "Fermat number", 31-Jul-2021, https://en.wikipedia.org/wiki/Fermat_number#Basic_properties . (Contributed by AV, 31-Jul-2021)

Ref Expression
Assertion fmtnorec4 N 2 FermatNo N = FermatNo N 1 2 2 FermatNo N 2 1 2

Proof

Step Hyp Ref Expression
1 eluz2nn N 2 N
2 nnm1nn0 N N 1 0
3 1 2 syl N 2 N 1 0
4 fmtno N 1 0 FermatNo N 1 = 2 2 N 1 + 1
5 3 4 syl N 2 FermatNo N 1 = 2 2 N 1 + 1
6 5 oveq1d N 2 FermatNo N 1 2 = 2 2 N 1 + 1 2
7 2nn 2
8 7 a1i N 2 2
9 2nn0 2 0
10 9 a1i N 2 2 0
11 10 3 nn0expcld N 2 2 N 1 0
12 8 11 nnexpcld N 2 2 2 N 1
13 12 nncnd N 2 2 2 N 1
14 binom21 2 2 N 1 2 2 N 1 + 1 2 = 2 2 N 1 2 + 2 2 2 N 1 + 1
15 13 14 syl N 2 2 2 N 1 + 1 2 = 2 2 N 1 2 + 2 2 2 N 1 + 1
16 2cn 2
17 16 a1i N 2 2
18 17 10 11 expmuld N 2 2 2 N 1 2 = 2 2 N 1 2
19 17 3 expp1d N 2 2 N - 1 + 1 = 2 N 1 2
20 1 nncnd N 2 N
21 npcan1 N N - 1 + 1 = N
22 20 21 syl N 2 N - 1 + 1 = N
23 22 oveq2d N 2 2 N - 1 + 1 = 2 N
24 19 23 eqtr3d N 2 2 N 1 2 = 2 N
25 24 oveq2d N 2 2 2 N 1 2 = 2 2 N
26 18 25 eqtr3d N 2 2 2 N 1 2 = 2 2 N
27 26 oveq1d N 2 2 2 N 1 2 + 2 2 2 N 1 = 2 2 N + 2 2 2 N 1
28 27 oveq1d N 2 2 2 N 1 2 + 2 2 2 N 1 + 1 = 2 2 N + 2 2 2 N 1 + 1
29 6 15 28 3eqtrd N 2 FermatNo N 1 2 = 2 2 N + 2 2 2 N 1 + 1
30 uznn0sub N 2 N 2 0
31 fmtno N 2 0 FermatNo N 2 = 2 2 N 2 + 1
32 30 31 syl N 2 FermatNo N 2 = 2 2 N 2 + 1
33 32 oveq1d N 2 FermatNo N 2 1 = 2 2 N 2 + 1 - 1
34 33 oveq1d N 2 FermatNo N 2 1 2 = 2 2 N 2 + 1 - 1 2
35 10 30 nn0expcld N 2 2 N 2 0
36 8 35 nnexpcld N 2 2 2 N 2
37 36 nncnd N 2 2 2 N 2
38 peano2cn 2 2 N 2 2 2 N 2 + 1
39 37 38 syl N 2 2 2 N 2 + 1
40 binom2sub1 2 2 N 2 + 1 2 2 N 2 + 1 - 1 2 = 2 2 N 2 + 1 2 - 2 2 2 N 2 + 1 + 1
41 39 40 syl N 2 2 2 N 2 + 1 - 1 2 = 2 2 N 2 + 1 2 - 2 2 2 N 2 + 1 + 1
42 binom21 2 2 N 2 2 2 N 2 + 1 2 = 2 2 N 2 2 + 2 2 2 N 2 + 1
43 37 42 syl N 2 2 2 N 2 + 1 2 = 2 2 N 2 2 + 2 2 2 N 2 + 1
44 43 oveq1d N 2 2 2 N 2 + 1 2 2 2 2 N 2 + 1 = 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1
45 44 oveq1d N 2 2 2 N 2 + 1 2 - 2 2 2 N 2 + 1 + 1 = 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1
46 34 41 45 3eqtrd N 2 FermatNo N 2 1 2 = 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1
47 46 oveq2d N 2 2 FermatNo N 2 1 2 = 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1
48 29 47 oveq12d N 2 FermatNo N 1 2 2 FermatNo N 2 1 2 = 2 2 N + 2 2 2 N 1 + 1 - 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1
49 36 10 nnexpcld N 2 2 2 N 2 2
50 49 nncnd N 2 2 2 N 2 2
51 17 37 mulcld N 2 2 2 2 N 2
52 50 51 addcld N 2 2 2 N 2 2 + 2 2 2 N 2
53 peano2cn 2 2 N 2 2 + 2 2 2 N 2 2 2 N 2 2 + 2 2 2 N 2 + 1
54 52 53 syl N 2 2 2 N 2 2 + 2 2 2 N 2 + 1
55 17 39 mulcld N 2 2 2 2 N 2 + 1
56 54 55 subcld N 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1
57 1cnd N 2 1
58 17 56 57 adddid N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1 = 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 2 1
59 52 57 addcld N 2 2 2 N 2 2 + 2 2 2 N 2 + 1
60 17 59 55 subdid N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 = 2 2 2 N 2 2 + 2 2 2 N 2 + 1 2 2 2 2 N 2 + 1
61 17 52 57 adddid N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 = 2 2 2 N 2 2 + 2 2 2 N 2 + 2 1
62 17 50 51 adddid N 2 2 2 2 N 2 2 + 2 2 2 N 2 = 2 2 2 N 2 2 + 2 2 2 2 N 2
63 17 10 35 expmuld N 2 2 2 N 2 2 = 2 2 N 2 2
64 17 30 expp1d N 2 2 N - 2 + 1 = 2 N 2 2
65 20 17 57 subsubd N 2 N 2 1 = N - 2 + 1
66 65 eqcomd N 2 N - 2 + 1 = N 2 1
67 66 oveq2d N 2 2 N - 2 + 1 = 2 N 2 1
68 64 67 eqtr3d N 2 2 N 2 2 = 2 N 2 1
69 68 oveq2d N 2 2 2 N 2 2 = 2 2 N 2 1
70 63 69 eqtr3d N 2 2 2 N 2 2 = 2 2 N 2 1
71 70 oveq2d N 2 2 2 2 N 2 2 = 2 2 2 N 2 1
72 2m1e1 2 1 = 1
73 72 a1i N 2 2 1 = 1
74 73 oveq2d N 2 N 2 1 = N 1
75 74 oveq2d N 2 2 N 2 1 = 2 N 1
76 75 oveq2d N 2 2 2 N 2 1 = 2 2 N 1
77 76 oveq2d N 2 2 2 2 N 2 1 = 2 2 2 N 1
78 71 77 eqtrd N 2 2 2 2 N 2 2 = 2 2 2 N 1
79 17 17 37 mulassd N 2 2 2 2 2 N 2 = 2 2 2 2 N 2
80 79 eqcomd N 2 2 2 2 2 N 2 = 2 2 2 2 N 2
81 78 80 oveq12d N 2 2 2 2 N 2 2 + 2 2 2 2 N 2 = 2 2 2 N 1 + 2 2 2 2 N 2
82 62 81 eqtrd N 2 2 2 2 N 2 2 + 2 2 2 N 2 = 2 2 2 N 1 + 2 2 2 2 N 2
83 2t1e2 2 1 = 2
84 83 a1i N 2 2 1 = 2
85 82 84 oveq12d N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 2 1 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2
86 61 85 eqtrd N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2
87 17 37 57 adddid N 2 2 2 2 N 2 + 1 = 2 2 2 N 2 + 2 1
88 84 oveq2d N 2 2 2 2 N 2 + 2 1 = 2 2 2 N 2 + 2
89 87 88 eqtrd N 2 2 2 2 N 2 + 1 = 2 2 2 N 2 + 2
90 89 oveq2d N 2 2 2 2 2 N 2 + 1 = 2 2 2 2 N 2 + 2
91 17 51 17 adddid N 2 2 2 2 2 N 2 + 2 = 2 2 2 2 N 2 + 2 2
92 2t2e4 2 2 = 4
93 92 a1i N 2 2 2 = 4
94 80 93 oveq12d N 2 2 2 2 2 N 2 + 2 2 = 2 2 2 2 N 2 + 4
95 90 91 94 3eqtrd N 2 2 2 2 2 N 2 + 1 = 2 2 2 2 N 2 + 4
96 86 95 oveq12d N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 2 2 2 2 N 2 + 1 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4
97 60 96 eqtrd N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4
98 97 84 oveq12d N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 2 1 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2
99 58 98 eqtrd N 2 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2
100 99 oveq2d N 2 2 2 N + 2 2 2 N 1 + 1 - 2 2 2 N 2 2 + 2 2 2 N 2 + 1 - 2 2 2 N 2 + 1 + 1 = 2 2 N + 2 2 2 N 1 + 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2
101 17 13 mulcld N 2 2 2 2 N 1
102 16 16 mulcli 2 2
103 102 a1i N 2 2 2
104 103 37 mulcld N 2 2 2 2 2 N 2
105 101 104 addcld N 2 2 2 2 N 1 + 2 2 2 2 N 2
106 105 17 addcld N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2
107 4cn 4
108 107 a1i N 2 4
109 104 108 addcld N 2 2 2 2 2 N 2 + 4
110 105 17 17 addassd N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 + 2 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 + 2
111 2p2e4 2 + 2 = 4
112 111 a1i N 2 2 + 2 = 4
113 112 oveq2d N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 + 2 = 2 2 2 N 1 + 2 2 2 2 N 2 + 4
114 101 104 108 addassd N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 4 = 2 2 2 N 1 + 2 2 2 2 N 2 + 4
115 110 113 114 3eqtrd N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 + 2 = 2 2 2 N 1 + 2 2 2 2 N 2 + 4
116 106 17 101 109 115 subaddeqd N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 = 2 2 2 N 1 2
117 116 eqcomd N 2 2 2 2 N 1 2 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4
118 106 109 subcld N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4
119 101 17 118 subadd2d N 2 2 2 2 N 1 2 = 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 2 N 1
120 117 119 mpbid N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 2 N 1
121 120 oveq2d N 2 2 2 N + 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 N + 2 2 2 N 1
122 eluzge2nn0 N 2 N 0
123 10 122 nn0expcld N 2 2 N 0
124 8 123 nnexpcld N 2 2 2 N
125 124 nncnd N 2 2 2 N
126 125 101 addcld N 2 2 2 N + 2 2 2 N 1
127 118 17 addcld N 2 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2
128 126 127 125 subadd2d N 2 2 2 N + 2 2 2 N 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 N 2 2 N + 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 N + 2 2 2 N 1
129 121 128 mpbird N 2 2 2 N + 2 2 2 N 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 N
130 129 oveq1d N 2 2 2 N + 2 2 2 N 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 + 1 = 2 2 N + 1
131 126 57 127 addsubd N 2 2 2 N + 2 2 2 N 1 + 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = 2 2 N + 2 2 2 N 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 + 1
132 fmtno N 0 FermatNo N = 2 2 N + 1
133 122 132 syl N 2 FermatNo N = 2 2 N + 1
134 130 131 133 3eqtr4d N 2 2 2 N + 2 2 2 N 1 + 1 - 2 2 2 N 1 + 2 2 2 2 N 2 + 2 - 2 2 2 2 N 2 + 4 + 2 = FermatNo N
135 48 100 134 3eqtrrd N 2 FermatNo N = FermatNo N 1 2 2 FermatNo N 2 1 2