Metamath Proof Explorer


Theorem fmtnosqrt

Description: The floor of the square root of a Fermat number. (Contributed by AV, 28-Jul-2021)

Ref Expression
Assertion fmtnosqrt
|- ( N e. NN -> ( |_ ` ( sqrt ` ( FermatNo ` N ) ) ) = ( 2 ^ ( 2 ^ ( N - 1 ) ) ) )

Proof

Step Hyp Ref Expression
1 nnnn0
 |-  ( N e. NN -> N e. NN0 )
2 fmtno
 |-  ( N e. NN0 -> ( FermatNo ` N ) = ( ( 2 ^ ( 2 ^ N ) ) + 1 ) )
3 1 2 syl
 |-  ( N e. NN -> ( FermatNo ` N ) = ( ( 2 ^ ( 2 ^ N ) ) + 1 ) )
4 3 fveq2d
 |-  ( N e. NN -> ( sqrt ` ( FermatNo ` N ) ) = ( sqrt ` ( ( 2 ^ ( 2 ^ N ) ) + 1 ) ) )
5 4 fveq2d
 |-  ( N e. NN -> ( |_ ` ( sqrt ` ( FermatNo ` N ) ) ) = ( |_ ` ( sqrt ` ( ( 2 ^ ( 2 ^ N ) ) + 1 ) ) ) )
6 id
 |-  ( N e. NN -> N e. NN )
7 1nn0
 |-  1 e. NN0
8 7 a1i
 |-  ( N e. NN -> 1 e. NN0 )
9 2nn
 |-  2 e. NN
10 9 a1i
 |-  ( N e. NN -> 2 e. NN )
11 2nn0
 |-  2 e. NN0
12 11 a1i
 |-  ( N e. NN -> 2 e. NN0 )
13 nnm1nn0
 |-  ( N e. NN -> ( N - 1 ) e. NN0 )
14 12 13 nn0expcld
 |-  ( N e. NN -> ( 2 ^ ( N - 1 ) ) e. NN0 )
15 peano2nn0
 |-  ( ( 2 ^ ( N - 1 ) ) e. NN0 -> ( ( 2 ^ ( N - 1 ) ) + 1 ) e. NN0 )
16 14 15 syl
 |-  ( N e. NN -> ( ( 2 ^ ( N - 1 ) ) + 1 ) e. NN0 )
17 10 16 nnexpcld
 |-  ( N e. NN -> ( 2 ^ ( ( 2 ^ ( N - 1 ) ) + 1 ) ) e. NN )
18 nngt0
 |-  ( ( 2 ^ ( ( 2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