:: Elementary Number Theory Problems. {P}art {V}
:: by Artur Korni{\l}owicz and Adam Naumowicz
::
:: Received September 30, 2022
:: Copyright (c) 2022-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies NUMBERS, SUBSET_1, ORDINAL1, ORDINAL2, CARD_1, XBOOLE_0, ARYTM_1,
TARSKI, ARYTM_3, XXREAL_0, NAT_1, RELAT_1, INT_1, INT_2, SQUARE_1,
NEWTON, FINSET_1, PBOOLE, FUNCT_1, ABIAN, FINSEQ_1, CARD_3, ORDINAL5,
XCMPLX_0, ZFMISC_1, NUMBER05, NUMBER09;
notations TARSKI, XBOOLE_0, SUBSET_1, RELAT_1, FUNCT_1, ORDINAL1, ORDINAL2,
NUMBERS, ENUMSET1, XCMPLX_0, NAT_1, XXREAL_0, INT_1, INT_2, NAT_D,
FINSEQ_1, MEMBERED, SQUARE_1, NEWTON, FINSET_1, PBOOLE, ABIAN, WSIERP_1,
ORDINAL5;
constructors NAT_D, RELSET_1, ABIAN, EULER_1, NAT_3, ORDINAL5, INT_5, PEPIN,
DOMAIN_1, WSIERP_1, POLYEQ_3;
registrations ORDINAL1, XXREAL_0, XREAL_0, NAT_1, CARD_1, INT_1, INT_2,
WSIERP_1, FOMODEL0, ABIAN, VALUED_0, FINSET_1, MEMBERED, NEWTON02,
ORDINAL5, NEWTON03, XCMPLX_0, NEWTON, NAT_6, PEPIN, RELAT_1;
requirements REAL, NUMERALS, SUBSET, BOOLE, ARITHM;
begin :: Problem 12
theorem :: NUMBER05:1
for n,k
being Nat st n|^|^k =
0 holds n =
0;
registration
let x
be odd Nat;
let i
be Nat;
cluster x|^|^i -> odd;
end;
registration
let x
be non zero even Nat;
let i
be non zero Nat;
cluster x|^|^i -> even;
end;
:: Problem 12
theorem :: NUMBER05:2
for n
being non zero Nat
ex x
being non zero Nat st
for i
being Nat
holds n divides x|^|^(i+
1) +
1;
begin :: Problem 13
theorem :: NUMBER05:3
for i
being Integer, n
being Nat
st n =
4*i+
3 ex p,q
being Nat st p =
4*q+
3 & p
is prime & p divides n;
definition
func 4k+
3_Primes -> Subset
of NAT means
:: NUMBER05:def 1
for n
being Nat
holds n
in it iff
ex k
being Nat st n=
4*k+
3 & n
is prime;
end;
theorem :: NUMBER05:4
for n
being Nat st n
in 4k+
3_Primes
holds n >=
3;
registration
cluster 4k+
3_Primes -> infinite;
end;
:: Problem 13
theorem :: NUMBER05:5
for n
being Nat st n
in 4k+
3_Primes
for x
being even Nat
for i
being Nat
holds not n divides x|^|^(i+
2) +
1;
begin :: Problem 31
theorem :: NUMBER05:6
for a
being Integer st
not 3 divides a
holds a|^
3 mod
9 =
1 or a|^
3 mod
9 =
8
;
:: Problem 31
theorem :: NUMBER05:7
for a,b,c
being Integer st
9 divides a|^
3+b|^
3+c|^
3 holds
3 divides a
or 3 divides b
or 3 divides c;
begin :: Problem 32
theorem :: NUMBER05:8
for a,b,c,n
being Integer
holds
(a+b+c) mod n = ((a mod n)+(b mod n)+(c mod n)) mod n;
theorem :: NUMBER05:9
for a,b,c,d,n
being Integer
holds
(a+b+c+d) mod n = ((a mod n)+(b mod n)+(c mod n)+(d mod n)) mod n;
theorem :: NUMBER05:10
for a,b,c,d,e,n
being Integer
holds
(a+b+c+d+e) mod n = ((a mod n)+(b mod n)+(c mod n)+(d mod n)+(e mod n)) mod n
;
:: Problem 32
theorem :: NUMBER05:11
for a1,a2,a3,a4,a5
being Integer st
9 divides a1|^
3+a2|^
3+a3|^
3+a4|^
3+a5|^
3
holds 3 divides a1*a2*a3*a4*a5;
begin :: Problem 33
reserve a,b,c,k,m,n
for Nat;
reserve p
for Prime;
::$CT
:: Problem 33 a
theorem :: NUMBER05:13
for x,y,z
being Nat st x,y are_coprime & x|^
2+y|^
2 = z|^
4 holds 7 divides x*y
;
:: Problem 33 b
theorem :: NUMBER05:14
not 15,
20 are_coprime &
15|^
2+
20|^
2 =
5|^
4 &
not 7 divides
15*
20;
begin :: Problem 35
definition
let x,y
be Nat;
pred x,y satisfy_Sierpinski_problem_35 means
:: NUMBER05:def 2
x*(x+
1) divides y*(y+
1) &
not x divides y &
not x+
1 divides y &
not x divides y+
1 &
not x+
1 divides y+
1;
end;
theorem :: NUMBER05:15
for x,y
being Nat st x =
36*k+
14 & y = (
12*k+
5)*(
18*k+
7)
holds
x,y satisfy_Sierpinski_problem_35;
:: Problem 35 a
theorem :: NUMBER05:16
{[x,y]
where x,y
is Nat: x,y satisfy_Sierpinski_problem_35}
is infinite;
:: Problem 35 b
theorem :: NUMBER05:17
14,
35 satisfy_Sierpinski_problem_35;
:: Problem 35 c
theorem :: NUMBER05:18
not ex x,y
being Nat st x <
14 & y <
35 & x,y satisfy_Sierpinski_problem_35;
begin :: Problem 40
theorem :: NUMBER05:19
a divides b
implies n|^a -
1 divides n|^b -
1;
:: Problem 40
theorem :: NUMBER05:20
2|^(
2|^n)+
1 divides
2|^(
2|^(
2|^n)+
1)-
2;
begin :: Problem 47
theorem :: NUMBER05:21
n divides
4 implies n =
1 or n =
2 or n =
4;
:: Problem 47
theorem :: NUMBER05:22
n >
6 implies ex a,b
being Nat st a >
1 & b >
1 & n = a+b & a,b are_coprime;
begin :: Problem 76
definition
let n
be Nat;
pred n satisfies_Sierpinski_problem_76a means
:: NUMBER05:def 3
for x
being Nat st n < x < n+
10 holds x
is non prime;
end;
definition
let m
be Nat;
pred m satisfies_Sierpinski_problem_76b means
:: NUMBER05:def 4
for x
being Nat st
10*m < x <
10*(m+
1)
holds x
is non prime;
end;
theorem :: NUMBER05:23
113 satisfies_Sierpinski_problem_76a;
theorem :: NUMBER05:24
114 satisfies_Sierpinski_problem_76a;
theorem :: NUMBER05:25
115 satisfies_Sierpinski_problem_76a;
theorem :: NUMBER05:26
116 satisfies_Sierpinski_problem_76a;
theorem :: NUMBER05:27
117 satisfies_Sierpinski_problem_76a;
theorem :: NUMBER05:28
139 satisfies_Sierpinski_problem_76a;
theorem :: NUMBER05:29
181 satisfies_Sierpinski_problem_76a;
:: Problem 76 a
theorem :: NUMBER05:30
n satisfies_Sierpinski_problem_76a & n <=
181 implies
n
in {
113,
114,
115,
116,
117,
139,
181};
theorem :: NUMBER05:31
20 satisfies_Sierpinski_problem_76b;
theorem :: NUMBER05:32
32 satisfies_Sierpinski_problem_76b;
theorem :: NUMBER05:33
51 satisfies_Sierpinski_problem_76b;
theorem :: NUMBER05:34
53 satisfies_Sierpinski_problem_76b;
theorem :: NUMBER05:35
62 satisfies_Sierpinski_problem_76b;
:: Problem 76 b
theorem :: NUMBER05:36
m satisfies_Sierpinski_problem_76b & m <=
62 implies m
in {
20,
32,
51,
53,
62};
begin :: Problem 79
theorem :: NUMBER05:37
c <>
0 & c < b
implies not (a*b+c) / b
is integer;
theorem :: NUMBER05:38
not ex m,n
being positive Nat st m^
2 - n^
2 =
1;
theorem :: NUMBER05:39
not ex m,n
being positive Nat st m^
2 - n^
2 =
4;
theorem :: NUMBER05:40
(
2*n+
1)^
2 mod
8 =
1;
theorem :: NUMBER05:41
n
is odd
implies n^
2 mod
8 =
1;
theorem :: NUMBER05:42
for q,s,t
being Prime st q^
2 = s^
2 + t^
2 holds
s
is even & t
is odd
or s
is odd & t
is even;
theorem :: NUMBER05:43
not ex q,s,t
being Prime st q^
2 = s^
2 + t^
2;
theorem :: NUMBER05:44
for p,q,r,s,t
being Prime st p^
2 + q^
2 = r^
2 + s^
2 + t^
2 holds
p
is even
or q
is even
or r
is even
or s
is even
or t
is even;
:: Problem 79
theorem :: NUMBER05:45
not ex p,q,r,s,t
being Prime st p^
2 + q^
2 = r^
2 + s^
2 + t^
2;