Metamath Proof Explorer


Theorem fmtnorec1

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

Ref Expression
Assertion fmtnorec1
|- ( N e. NN0 -> ( FermatNo ` ( N + 1 ) ) = ( ( ( ( FermatNo ` N ) - 1 ) ^ 2 ) + 1 ) )

Proof

Step Hyp Ref Expression
1 peano2nn0
 |-  ( N e. NN0 -> ( N + 1 ) e. NN0 )
2 fmtno
 |-  ( ( N + 1 ) e. NN0 -> ( FermatNo ` ( N + 1 ) ) = ( ( 2 ^ ( 2 ^ ( N + 1 ) ) ) + 1 ) )
3 1 2 syl
 |-  ( N e. NN0 -> ( FermatNo ` ( N + 1 ) ) = ( ( 2 ^ ( 2 ^ ( N + 1 ) ) ) + 1 ) )
4 2nn0
 |-  2 e. NN0
5 nn0expcl
 |-  ( ( 2 e. NN0 /\ N e. NN0 ) -> ( 2 ^ N ) e. NN0 )
6 4 5 mpan
 |-  ( N e. NN0 -> ( 2 ^ N ) e. NN0 )
7 nn0expcl
 |-  ( ( 2 e. NN0 /\ ( 2 ^ N ) e. NN0 ) -> ( 2 ^ ( 2 ^ N ) ) e. NN0 )
8 7 nn0cnd
 |-  ( ( 2 e. NN0 /\ ( 2 ^ N ) e. NN0 ) -> ( 2 ^ ( 2 ^ N ) ) e. CC )
9 4 6 8 sylancr
 |-  ( N e. NN0 -> ( 2 ^ ( 2 ^ N ) ) e. CC )
10 pncan1
 |-  ( ( 2 ^ ( 2 ^ N ) ) e. CC -> ( ( ( 2 ^ ( 2 ^ N ) ) + 1 ) - 1 ) = ( 2 ^ ( 2 ^ N ) ) )
11 9 10 syl
 |-  ( N e. NN0 -> ( ( ( 2 ^ ( 2 ^ N ) ) + 1 ) - 1 ) = ( 2 ^ ( 2 ^ N ) ) )
12 11 oveq1d
 |-  ( N e. NN0 -> ( ( ( ( 2 ^ ( 2 ^ N ) ) + 1 ) - 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