:: Elementary Number Theory Problems. {P}art {IV}
:: by Artur Korni{\l}owicz
::
:: 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, NAT_1, RELAT_1, FUNCT_1, XXREAL_0, ARYTM_3, XCMPLX_0,
CARD_1, INT_1, NEWTON, INT_2, ARYTM_1, SUBSET_1, XBOOLE_0, TARSKI,
FINSET_1, PBOOLE, ABIAN, SQUARE_1, EULER_1, MEMBERED, NUMBER03, REAL_1,
VALUED_0, FIB_NUM2, NUMBER04, CARD_3, NUMBER02, FINSEQ_1, ORDINAL4,
FINSEQ_2;
notations TARSKI, XBOOLE_0, SUBSET_1, ENUMSET1, ORDINAL1, NUMBERS, XCMPLX_0,
RELAT_1, FUNCT_1, PBOOLE, FINSET_1, MEMBERED, VALUED_0, XREAL_0, INT_1,
INT_2, NAT_1, NAT_D, XXREAL_0, XXREAL_2, FINSEQ_1, FINSEQ_2, RVSUM_1,
SQUARE_1, NEWTON, ABIAN, EULER_1, EULER_2, FIB_NUM2, NUMBER02, NUMBER03;
constructors NAT_D, RELSET_1, ABIAN, NAT_6, ENUMSET1, EULER_1, PEPIN,
FIB_NUM2, XXREAL_2, NAT_3, NUMBER02, NUMBER03, RVSUM_1, EULER_2,
RECDEF_1;
registrations ORDINAL1, FINSET_1, NUMBERS, XCMPLX_0, XXREAL_0, XREAL_0, NAT_1,
INT_1, MEMBERED, VALUED_0, CARD_1, NEWTON, NEWTON02, NEWTON03, ABIAN,
NAT_6, JORDAN1D, WSIERP_1, XXREAL_2, PEPIN, NEWTON01, FINSEQ_1, RVSUM_1,
RELAT_1, FUNCOP_1, EULER_2, NUMBER02, INT_6;
requirements REAL, NUMERALS, BOOLE, SUBSET, ARITHM;
begin
reserve X
for set;
reserve a,b,c,k,m,n
for Nat;
reserve i
for Integer;
reserve r
for Real;
reserve p
for Prime;
registration
let p
be Prime;
reduce 1 mod p to
1;
end;
registration
let n;
reduce (<*>NAT) mod n to <*>NAT;
reduce (<*>INT) mod n to <*>INT;
end;
theorem :: NUMBER04:1
for X
being non empty natural-membered set st
for a st a
in X
ex b st b > a & b
in X
holds X
is infinite;
registration
cluster EvenNAT -> infinite;
cluster OddNAT -> infinite;
end;
registration
cluster -> even
for Element
of EvenNAT;
cluster -> odd
for Element
of OddNAT;
end;
::$CT
theorem :: NUMBER04:3 :: search in MML
for a,b,c
being Integer st a*b divides c
holds a divides c & b divides c;
theorem :: NUMBER04:4 :: search in MML
for a,b,m
being Integer st a,b are_congruent_mod m
holds
not m divides a
or m divides b;
theorem :: NUMBER04:5
k
is odd
implies (-
1)|^k,-
1 are_congruent_mod n;
theorem :: NUMBER04:6
for a,b
being Integer
holds
k <>
0 & a,b are_congruent_mod n|^k
implies a,b are_congruent_mod n;
theorem :: NUMBER04:7 :: to generalize
2|^(
4*n),
1 are_congruent_mod
5;
theorem :: NUMBER04:8
2|^(
12*n),
1 are_congruent_mod
13;
theorem :: NUMBER04:9
<*i*> mod n = <*i mod n*>;
theorem :: NUMBER04:10
n <>
0 implies for f
being integer-valued FinSequence
holds
Sum f, Sum (f mod n) are_congruent_mod n;
theorem :: NUMBER04:11
(a <>
0 or b <>
0) & c <>
0 &
a,b,c are_mutually_coprime
implies a*b,c are_coprime;
theorem :: NUMBER04:12
(a <>
0 or b <>
0) & c <>
0 &
a,b,c are_mutually_coprime & a divides n & b divides n & c divides n
implies a*b*c divides n;
theorem :: NUMBER04:13
k
is odd
implies a|^n+
1 divides a|^(n*k)+
1;
theorem :: NUMBER04:14
for n
being even Nat st n divides
2|^n+
2
ex k
being non zero odd Nat st
2|^n+
2 = n*k;
begin :: Main problems
theorem :: NUMBER04:15
for n
being even Nat st n divides
2|^n+
2 & n-
1 divides
2|^n+
1 holds
for n1
being Nat st n1 =
2|^n+
2 holds
n1-
1 divides
2|^n1+
1 & n1 divides
2|^n1+
2;
theorem :: NUMBER04:16
{n
where n
is non zero even Nat: n divides
2|^n+
2 & n-
1 divides
2|^n+
1}
is infinite;
definition
let i
be Integer;
attr i
is double_odd means
:: NUMBER04:def 1
ex j
being odd Integer st i =
2*j;
end;
definition
let i
be Nat;
redefine
attr i
is double_odd means
:: NUMBER04:def 2
ex j
being odd Nat st i =
2*j;
end;
registration
cluster double_odd
for Integer;
end;
registration
cluster double_odd -> even
for Integer;
end;
registration
let i
be odd Integer;
cluster i|^
2+
1 -> double_odd;
end;
registration
let i
be odd Integer;
cluster i^
2+
1 -> double_odd;
end;
definition
let r
be Complex, n
be Nat;
func OddEvenPowers(r,n) -> complex-valued FinSequence means
:: NUMBER04:def 3
len it = n &
for i
being Nat st
1 <= i <= n
holds
for m
being Nat st m = n-i
holds
(i
is odd
implies it.i = r|^m) & (i
is even
implies it.i = -r|^m);
end;
registration
let r
be Real, n
be Nat;
cluster OddEvenPowers(r,n) -> real-valued;
end;
registration
let r
be Integer, n
be Nat;
cluster OddEvenPowers(r,n) -> INT-valued;
end;
theorem :: NUMBER04:17
for r
being Complex
holds OddEvenPowers(r,
1) = <*
1*>;
theorem :: NUMBER04:18
for r
being Complex
holds Sum OddEvenPowers(r,
1) =
1;
theorem :: NUMBER04:19
for r
being Complex
holds
OddEvenPowers(r,
2*(k+
1)+
1) =
<*r|^(
2*k+
2),-r|^(
2*k+
1)*> ^ OddEvenPowers(r,
2*k+
1);
theorem :: NUMBER04:20
Sum OddEvenPowers(r,
2*k+
3) =
r|^(
2*k+
2) - r|^(
2*k+
1) + Sum OddEvenPowers(r,
2*k+
1);
theorem :: NUMBER04:21
r|^(
2*n+
1) +
1 = (r+
1) * Sum OddEvenPowers(r,
2*n+
1);
theorem :: NUMBER04:22
for p
being odd Prime st p|^(k+
1) divides a|^(p|^k) +
1 holds
p|^(k+
2) divides a|^(p|^(k+
1)) +
1;
theorem :: NUMBER04:23
for p
being odd Prime
holds p divides a+
1 implies
p|^(k+
1) divides a|^(p|^k) +
1 & p|^k divides a|^(p|^k) +
1;
theorem :: NUMBER04:24
for a
being odd Nat st a >
1
for s
being Nat st s
is double_odd & a|^s+
1 is double_odd & s divides a|^s+
1
holds
a|^s+
1 > s & a|^s+
1 is double_odd & a|^(a|^s+
1)+
1 is double_odd &
a|^s+
1 divides a|^(a|^s+
1)+
1;
:: Problem 17
theorem :: NUMBER04:25
for a
being Nat st a >
1 holds
{n
where n
is Nat: n divides a|^n+
1}
is infinite;
:: Problem 18
theorem :: NUMBER04:26
{n
where n
is Nat: n divides
2|^n+
2}
is infinite;
:: Problem 26 a
theorem :: NUMBER04:27
{n
where n
is Nat:
5 divides
2|^n-
3}
is infinite;
:: Problem 26 b
theorem :: NUMBER04:28
{n
where n
is Nat:
13 divides
2|^n-
3}
is infinite;
theorem :: NUMBER04:29
2|^(n+
12),
2|^n are_congruent_mod
65;
theorem :: NUMBER04:30
2|^n,
2|^(n mod
12) are_congruent_mod
65;
:: Problem 26 c
theorem :: NUMBER04:31
not 65 divides
2|^n-
3;
theorem :: NUMBER04:32
341 is composite;
:: Problem 27 a
theorem :: NUMBER04:33
561 is composite;
theorem :: NUMBER04:34
645 is composite;
:: Problem 27 b
theorem :: NUMBER04:35
1105 is composite;
:: Problem 28 a
theorem :: NUMBER04:36
341 divides
2|^
341-
2;
theorem :: NUMBER04:37
3 divides
2|^
561-
2;
theorem :: NUMBER04:38
11 divides
2|^
561-
2;
theorem :: NUMBER04:39
17 divides
2|^
561-
2;
:: Problem 27 c
theorem :: NUMBER04:40
561 divides
2|^
561-
2;
theorem :: NUMBER04:41
3 divides
2|^
645-
2;
theorem :: NUMBER04:42
5 divides
2|^
645-
2;
theorem :: NUMBER04:43
43 divides
2|^
645-
2;
theorem :: NUMBER04:44
645 divides
2|^
645-
2;
theorem :: NUMBER04:45
5 divides
2|^
1105-
2;
theorem :: NUMBER04:46
13 divides
2|^
1105-
2;
theorem :: NUMBER04:47
17 divides
2|^
1105-
2;
:: Problem 27 d
theorem :: NUMBER04:48
1105 divides
2|^
1105-
2;
theorem :: NUMBER04:49
for n
being composite Nat
holds
n <=
1105 & n divides
2|^n-
2 implies n
in {
341,
561,
645,
1105};
:: Problem 28 b
theorem :: NUMBER04:50
not 341 divides
3|^
341-
3;
theorem :: NUMBER04:51
3 divides
3|^
561-
3;
theorem :: NUMBER04:52
11 divides
3|^
561-
3;
theorem :: NUMBER04:53
17 divides
3|^
561-
3;
:: Problem 27 e
theorem :: NUMBER04:54
561 divides
3|^
561-
3;
theorem :: NUMBER04:55
not 43 divides
3|^
645-
3;
theorem :: NUMBER04:56
not 645 divides
3|^
645-
3;
theorem :: NUMBER04:57
5 divides
3|^
1105-
3;
theorem :: NUMBER04:58
13 divides
3|^
1105-
3;
theorem :: NUMBER04:59
17 divides
3|^
1105-
3;
:: Problem 27 f
theorem :: NUMBER04:60
1105 divides
3|^
1105-
3;
:: Problem 27 g
theorem :: NUMBER04:61
n <=
1105 & n
is composite & n divides
2|^n-
2 & n divides
3|^n-
3 implies
n
in {
561,
1105};
theorem :: NUMBER04:62
n divides
2|^n-
2 &
not n divides
3|^n-
3 implies n
is composite;
:: Problem 28 c
theorem :: NUMBER04:63
n <=
341 & n divides
2|^n-
2 &
not n divides
3|^n-
3 implies n =
341;
theorem :: NUMBER04:64
m,n are_coprime
implies a*n+m,n are_coprime;
theorem :: NUMBER04:65
7 divides
10|^(
6*k+
4) +
3;
theorem :: NUMBER04:66
10|^(
6*k+
4) +
3 is composite;
:: Problem 98
theorem :: NUMBER04:67
{
10|^n+
3 where n
is Nat:
10|^n+
3 is composite }
is infinite;