Metamath Proof Explorer


Theorem fmtnorec3

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

Ref Expression
Assertion fmtnorec3 N2FermatNoN=FermatNoN1+22N1n=0N2FermatNon

Proof

Step Hyp Ref Expression
1 fzfid N20N2Fin
2 elfznn0 n0N2n0
3 fmtnonn n0FermatNon
4 2 3 syl n0N2FermatNon
5 4 nncnd n0N2FermatNon
6 5 adantl N2n0N2FermatNon
7 1 6 fprodcl N2n=0N2FermatNon
8 2cn 2
9 8 a1i N22
10 uznn0sub N2N20
11 fmtnorec2 N20FermatNoN-2+1=n=0N2FermatNon+2
12 10 11 syl N2FermatNoN-2+1=n=0N2FermatNon+2
13 12 eqcomd N2n=0N2FermatNon+2=FermatNoN-2+1
14 7 9 13 mvlraddd N2n=0N2FermatNon=FermatNoN-2+12
15 14 oveq2d N222N1n=0N2FermatNon=22N1FermatNoN-2+12
16 15 oveq2d N2FermatNoN1+22N1n=0N2FermatNon=FermatNoN1+22N1FermatNoN-2+12
17 2nn0 20
18 17 a1i N220
19 eluz2nn N2N
20 nnm1nn0 NN10
21 19 20 syl N2N10
22 18 21 nn0expcld N22N10
23 18 22 nn0expcld N222N10
24 23 nn0cnd N222N1
25 peano2nn0 N20N-2+10
26 10 25 syl N2N-2+10
27 fmtnonn N-2+10FermatNoN-2+1
28 26 27 syl N2FermatNoN-2+1
29 28 nncnd N2FermatNoN-2+1
30 24 29 9 subdid N222N1FermatNoN-2+12=22N1FermatNoN-2+122N12
31 eluzelcn N2N
32 ax-1cn 1
33 32 a1i N21
34 subsub N21N21=N-2+1
35 34 eqcomd N21N-2+1=N21
36 31 9 33 35 syl3anc N2N-2+1=N21
37 2m1e1 21=1
38 37 oveq2i N21=N1
39 36 38 eqtrdi N2N-2+1=N1
40 39 fveq2d N2FermatNoN-2+1=FermatNoN1
41 40 oveq2d N222N1FermatNoN-2+1=22N1FermatNoN1
42 41 oveq1d N222N1FermatNoN-2+122N12=22N1FermatNoN122N12
43 30 42 eqtrd N222N1FermatNoN-2+12=22N1FermatNoN122N12
44 43 oveq2d N2FermatNoN1+22N1FermatNoN-2+12=FermatNoN1+22N1FermatNoN1-22N12
45 fmtnonn N10FermatNoN1
46 21 45 syl N2FermatNoN1
47 46 nncnd N2FermatNoN1
48 47 mullidd N21FermatNoN1=FermatNoN1
49 48 eqcomd N2FermatNoN1=1FermatNoN1
50 49 oveq1d N2FermatNoN1+22N1FermatNoN1=1FermatNoN1+22N1FermatNoN1
51 33 24 47 adddird N21+22N1FermatNoN1=1FermatNoN1+22N1FermatNoN1
52 33 24 addcomd N21+22N1=22N1+1
53 fmtno N10FermatNoN1=22N1+1
54 21 53 syl N2FermatNoN1=22N1+1
55 52 54 eqtr4d N21+22N1=FermatNoN1
56 55 oveq1d N21+22N1FermatNoN1=FermatNoN1FermatNoN1
57 47 sqvald N2FermatNoN12=FermatNoN1FermatNoN1
58 56 57 eqtr4d N21+22N1FermatNoN1=FermatNoN12
59 50 51 58 3eqtr2d N2FermatNoN1+22N1FermatNoN1=FermatNoN12
60 59 oveq1d N2FermatNoN1+22N1FermatNoN1-22N12=FermatNoN1222N12
61 24 47 mulcld N222N1FermatNoN1
62 24 9 mulcld N222N12
63 47 61 62 addsubassd N2FermatNoN1+22N1FermatNoN1-22N12=FermatNoN1+22N1FermatNoN1-22N12
64 npcan1 NN-1+1=N
65 31 64 syl N2N-1+1=N
66 65 eqcomd N2N=N-1+1
67 66 fveq2d N2FermatNoN=FermatNoN-1+1
68 fmtnorec1 N10FermatNoN-1+1=FermatNoN112+1
69 21 68 syl N2FermatNoN-1+1=FermatNoN112+1
70 binom2sub1 FermatNoN1FermatNoN112=FermatNoN12-2FermatNoN1+1
71 47 70 syl N2FermatNoN112=FermatNoN12-2FermatNoN1+1
72 71 oveq1d N2FermatNoN112+1=FermatNoN122FermatNoN1+1+1
73 46 nnsqcld N2FermatNoN12
74 73 nncnd N2FermatNoN12
75 9 47 mulcld N22FermatNoN1
76 74 75 subcld N2FermatNoN122FermatNoN1
77 76 33 33 addassd N2FermatNoN122FermatNoN1+1+1=FermatNoN122FermatNoN1+1+1
78 32 2timesi 21=1+1
79 78 eqcomi 1+1=21
80 79 a1i N21+1=21
81 80 oveq2d N2FermatNoN122FermatNoN1+1+1=FermatNoN12-2FermatNoN1+21
82 77 81 eqtrd N2FermatNoN122FermatNoN1+1+1=FermatNoN12-2FermatNoN1+21
83 8 32 mulcli 21
84 83 a1i N221
85 74 75 84 subadd23d N2FermatNoN12-2FermatNoN1+21=FermatNoN12+21-2FermatNoN1
86 9 33 47 subdid N221FermatNoN1=212FermatNoN1
87 86 eqcomd N2212FermatNoN1=21FermatNoN1
88 87 oveq2d N2FermatNoN12+21-2FermatNoN1=FermatNoN12+21FermatNoN1
89 33 47 subcld N21FermatNoN1
90 9 89 mulneg2d N221FermatNoN1=21FermatNoN1
91 33 47 negsubdi2d N21FermatNoN1=FermatNoN11
92 fmtnom1nn N10FermatNoN11=22N1
93 21 92 syl N2FermatNoN11=22N1
94 91 93 eqtrd N21FermatNoN1=22N1
95 94 oveq2d N221FermatNoN1=222N1
96 90 95 eqtr3d N221FermatNoN1=222N1
97 96 oveq2d N2FermatNoN1221FermatNoN1=FermatNoN12222N1
98 9 89 mulcld N221FermatNoN1
99 74 98 subnegd N2FermatNoN1221FermatNoN1=FermatNoN12+21FermatNoN1
100 9 24 mulcomd N2222N1=22N12
101 100 oveq2d N2FermatNoN12222N1=FermatNoN1222N12
102 97 99 101 3eqtr3d N2FermatNoN12+21FermatNoN1=FermatNoN1222N12
103 85 88 102 3eqtrd N2FermatNoN12-2FermatNoN1+21=FermatNoN1222N12
104 72 82 103 3eqtrd N2FermatNoN112+1=FermatNoN1222N12
105 67 69 104 3eqtrrd N2FermatNoN1222N12=FermatNoN
106 60 63 105 3eqtr3d N2FermatNoN1+22N1FermatNoN1-22N12=FermatNoN
107 16 44 106 3eqtrrd N2FermatNoN=FermatNoN1+22N1n=0N2FermatNon