let n be Nat; :: thesis: card { k where k is Nat : k divides 5 |^ n } = n + 1
deffunc H1( Nat) -> set = 5 |^ $1;
A1: H1( 0 ) = 1 by NEWTON:4;
deffunc H2( Nat) -> set = { m where m is Nat : m divides H1($1) } ;
defpred S1[ Nat] means card H2($1) = $1 + 1;
A2: S1[ 0 ]
proof
H2( 0 ) = {1}
proof
thus H2( 0 ) c= {1} :: according to XBOOLE_0:def 10 :: thesis: {1} c= H2( 0 )
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in H2( 0 ) or x in {1} )
assume x in H2( 0 ) ; :: thesis: x in {1}
then consider m being Nat such that
A3: x = m and
A4: m divides H1( 0 ) ;
A5: m mod 4 = 1 by A4, Th34;
0 mod 4 = 0 ;
then m = 1 by A1, A5, A4, NAT_D:7, NAT_1:25;
hence x in {1} by A3, TARSKI:def 1; :: thesis: verum
end;
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in {1} or x in H2( 0 ) )
assume x in {1} ; :: thesis: x in H2( 0 )
then x = 1 by TARSKI:def 1;
hence x in H2( 0 ) by A1; :: thesis: verum
end;
hence S1[ 0 ] by CARD_1:30; :: thesis: verum
end;
A6: for a being Nat st S1[a] holds
S1[a + 1]
proof
let a be Nat; :: thesis: ( S1[a] implies S1[a + 1] )
assume A7: S1[a] ; :: thesis: S1[a + 1]
set b = a + 1;
set K = H1(a + 1);
reconsider An = H2(a) as finite set by Lm9;
A8: now :: thesis: not H1(a + 1) in An
assume H1(a + 1) in An ; :: thesis: contradiction
then A9: ex m being Nat st
( H1(a + 1) = m & m divides H1(a) ) ;
a < a + 1 by NAT_1:16;
hence contradiction by A9, NAT_D:7, PEPIN:66; :: thesis: verum
end;
H2(a + 1) = H2(a) \/ {H1(a + 1)}
proof
thus H2(a + 1) c= H2(a) \/ {H1(a + 1)} :: according to XBOOLE_0:def 10 :: thesis: H2(a) \/ {H1(a + 1)} c= H2(a + 1)
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in H2(a + 1) or x in H2(a) \/ {H1(a + 1)} )
assume x in H2(a + 1) ; :: thesis: x in H2(a) \/ {H1(a + 1)}
then consider m being Nat such that
A10: x = m and
A11: m divides H1(a + 1) ;
consider t being Element of NAT such that
A12: m = H1(t) and
A13: t <= a + 1 by A11, PEPIN:34, PEPIN:59;
per cases ( t <= a or t = a + 1 ) by A13, NAT_1:8;
suppose t <= a ; :: thesis: x in H2(a) \/ {H1(a + 1)}
then H1(t) divides H1(a) by NEWTON:89;
then x in H2(a) by A10, A12;
hence x in H2(a) \/ {H1(a + 1)} by XBOOLE_0:def 3; :: thesis: verum
end;
suppose t = a + 1 ; :: thesis: x in H2(a) \/ {H1(a + 1)}
then x in {H1(a + 1)} by A10, A12, TARSKI:def 1;
hence x in H2(a) \/ {H1(a + 1)} by XBOOLE_0:def 3; :: thesis: verum
end;
end;
end;
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in H2(a) \/ {H1(a + 1)} or x in H2(a + 1) )
assume x in H2(a) \/ {H1(a + 1)} ; :: thesis: x in H2(a + 1)
per cases then ( x in H2(a) or x in {H1(a + 1)} ) by XBOOLE_0:def 3;
suppose x in H2(a) ; :: thesis: x in H2(a + 1)
then consider m being Nat such that
A14: ( x = m & m divides H1(a) ) ;
a <= a + 1 by NAT_1:16;
then H1(a) divides H1(a + 1) by NEWTON:89;
then ex m being Nat st
( x = m & m divides H1(a + 1) ) by A14, INT_2:9;
hence x in H2(a + 1) ; :: thesis: verum
end;
suppose x in {H1(a + 1)} ; :: thesis: x in H2(a + 1)
then x = H1(a + 1) by TARSKI:def 1;
hence x in H2(a + 1) ; :: thesis: verum
end;
end;
end;
hence S1[a + 1] by A7, A8, CARD_2:41; :: thesis: verum
end;
for a being Nat holds S1[a] from NAT_1:sch 2(A2, A6);
hence card { k where k is Nat : k divides 5 |^ n } = n + 1 ; :: thesis: verum