avewright/proofwiki-math huggingface dataset:
Theorem: Noether's Theorem (Hamiltonian Mechanics)

Let there be an infinitesimal transformation of generalised coordinates such that:
:$q_i \to \tilde q_i = q_i + q_i^\alpha \tuple {q, \dot q, t} \varepsilon_\alpha + \hbox {terms vanishing on shell}$
where $\varepsilon$ is not time-dependent.
Under this transformation, let the variation of the Lagrangian be:
:$L \tuple {q + \delta q, \dot q + \delta \dot q, t} - L \tuple{q, \dot q, t} = \dfrac {\d} {\d t} \LL^\alpha \tuple {q, \dot q, t} \varepsilon_\alpha$
Let $s$ be the number of degrees of freedom of the system.
Then the quantity:
:$\ds \JJ^\alpha = \sum_{i \mathop = 1}^s \frac {\partial L} {\partial \dot q_i} q_i^\alpha - \LL^\alpha$
is conserved.

Proof:
{{proof wanted}}
{{Namedfor|Emmy Noether|cat = Noether E}}
Category:Partial Differential Equations
Category:Physics
Category:Hamiltonian Mechanics
Category:Calculus of Variations
ftjzbexnj494jsdgbxk0nuhx7nf6e3h
Theorem: Magic Constant of Order 4 Magic Square

The magic constant of the order $4$ magic square is $34$.

Proof:
Let $M_4$ denote an order $4$ magic square
By Sum of Terms of Magic Square, the total of all the entries in $M_4$ is given by:
:$T_4 = \dfrac {4^2 \left({4^2 + 1}\right)} 2 = \dfrac {16 \times 17} 2 = 136$
As there are $4$ rows of $M_4$, the magic constant of $M_4$ is given by:
:$S_4 = \dfrac {136} 4 = 34$
{{qed}}
Theorem: Magic Constant of Order 4 Magic Square

The magic constant of the order $4$ magic square is $34$.

Proof:
Let $M_n$ denote the magic square of order $n$.
By Magic Constant of Magic Square, the magic constant of $M_n$ is given by:
:$S_n = \dfrac {n \left({n^2 + 1}\right)} 2$
Setting $n = 4$:
:$S_4 = \dfrac {4 \times 17} 2 = 34$
{{qed}}
Theorem: Sum of Cubes on Diagonals of Moessner's Order 4 Magic Square

The sums of the cubes of the entries on the diagonals of Moessner's order $4$ magic square are equal.

Proof:
Recall Moessner's order $4$ magic square:
{{:Definition:Moessner's Order 4 Magic Square}}
{{begin-eqn}}
{{eqn | l = 12^3 + 3^3 + 14^3 + 5^3
      | r = 1728 + 27 + 2744 + 125
      | c = 
}}
{{eqn | r = 4624
      | c = 
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = 9^3 + 2^3 + 15^3 + 8^3
      | r = 729 + 8 + 3375 + 512
      | c = 
}}
{{eqn | r = 4624
      | c = 
}}
{{end-eqn}}
{{qed}}
Theorem: Sum of Squares on Pairs of Rows and Columns of Moessner's Order 4 Magic Square

The sums of the squares of the entries are equal on the following pairs of rows and columns of Moessner's order $4$ magic square:
:Rows $1$ and $4$
:Rows $2$ and $3$
:Columns $1$ and $4$
:Columns $2$ and $3$.

Proof:
Recall Moessner's order $4$ magic square:
{{:Definition:Moessner's Order 4 Magic Square}}
Theorem: Equivalence of Definitions of Quasiperfect Number

The following definitions of a quasiperfect number are equivalent:

Proof:
By definition of abundance:
:$\map A n = \map {\sigma_1} n - 2 n$
By definition of divisor sum function:
:$\map {\sigma_1} n$ is the sum of all the divisors of $n$.
Thus $\map {\sigma_1} n - n$ is the sum of the aliquot parts of $n$.
Hence the result.
{{qed}}
Category:Quasiperfect Numbers
doe8kd8xsd3rd8z2o3wt2ibh0ik4sq3
Theorem: Quasiperfect Number is Square of Odd Integer

Let $n$ be a quasiperfect number.
Then:
:$n = \paren {2 k + 1}^2$
for some $k \in \Z_{>0}$.
That is, a quasiperfect number is the square of an odd integer.

Proof:
By definition of quasiperfect number:
:$\map {\sigma_1} n = 2 n + 1$
where $\map {\sigma_1} n$ denotes the divisor sum of $n$.
That is, $\map {\sigma_1} n$ is odd.
Then from Divisor Sum is Odd iff Argument is Square or Twice Square:
$n$ is either square or twice a square.
Suppose $n = 2^k m^2$ is a quasiperfect number, where $m$ is odd and $k \in \Z_{\ge 0}$.
Then:
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} n
      | r = \map {\sigma_1} {2^k} \map {\sigma_1} {m^2}
      | c = Divisor Sum Function is Multiplicative
}}
{{eqn | r = \paren {2^{k + 1} - 1} \map {\sigma_1} {m^2}
      | c = Divisor Sum of Power of Prime
}}
{{eqn | r = 2 n + 1
      | c = {{Defof|Quasiperfect Number}}
}}
{{eqn | r = 2^{k + 1} m^2 + 1
}}
{{end-eqn}}
Hence we have:
:$\paren {2^{k + 1} - 1} \divides \paren {2^{k + 1} m^2 + 1}$
Since:
:$\paren {2^{k + 1} - 1} \divides \paren {2^{k + 1} m^2 - m^2}$
we have:
:$\paren {2^{k + 1} - 1} \divides \paren {1 + m^2}$
{{AimForCont}} $k > 0$.
Write:
:$m^2 \equiv -1 \pmod {2^{k + 1} - 1}$
But by First Supplement to Law of Quadratic Reciprocity (extended to Jacobi symbols):
:$\paren {\dfrac {-1} {2^{k + 1} - 1} } = \paren {-1}^{\frac {2^{k + 1} - 1 - 1} 2} = \paren {-1}^{2^k - 1} = -1$
{{WIP|Maybe it is worth it to extend quadratic residue/reciprocity results to Jacobi symbols.}}
Hence $-1$ is not a quadratic residue modulo $2^{k + 1} - 1$, contradicting the above.
Therefore we must have $k = 0$.
In this case, $n = m^2$, an odd square.
{{qed}}
Theorem: Bottom in Ordered Set of Topology

Let $T = \struct {S, \tau}$ be a topological space.
Let $P = \struct {\tau, \subseteq}$ be an inclusion ordered set of $\tau$.
Then $P$ is bounded below and $\bot_P = \O$

Proof:
By Empty Set is Element of Topology:
:$\O \in \tau$
By Empty Set is Subset of All Sets:
:$\forall A \in \tau: \O \subseteq A$
Hence $P$ is bounded below.
Thus by definition of the smallest element:
:$\bot_P = \O$
{{qed}}
Theorem: Long Period Prime/Examples/17

The prime number $17$ is a long period prime:
:$\dfrac 1 {17} = 0 \cdotp \dot 05882 \, 35294 \, 11764 \, \dot 7$

Proof:
From Reciprocal of $17$:
{{:Reciprocal of 17}}
Counting the digits, it is seen that this has a period of recurrence of $16$.
Hence the result.
{{qed}}
Theorem: Prime Dudeney Number

The only prime Dudeney number is $17$:

Proof:
We have that:
{{begin-eqn}}
{{eqn | l = 17^3
      | r = 4913
      | c = 
}}
{{eqn | l = 17
      | r = 4 + 9 + 1 + 3
      | c = 
}}
{{end-eqn}}
From Sequence of Dudeney Numbers, the complete set of positive integers with this property are:
:$0, 1, 8, 17, 18, 26, 27$
Of these, only $17$ is prime.
{{qed}}
Theorem: Sequence of Dudeney Numbers

The only Dudeney numbers are:
:$0, 1, 8, 17, 18, 26, 27$
two of which are themselves cubes, and one of which is prime.

Proof:
We have trivially that:
{{begin-eqn}}
{{eqn | l = 0^3
      | r = 0
      | c = 
}}
{{eqn | l = 1^3
      | r = 1
      | c = 
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = 8^3
      | r = 512
      | c = 
}}
{{eqn | l = 8
      | r = 5 + 1 + 2
      | c = 
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = 17^3
      | r = 4913
      | c = 
}}
{{eqn | l = 17
      | r = 4 + 9 + 1 + 3
      | c = 
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = 18^3
      | r = 5832
      | c = 
}}
{{eqn | l = 18
      | r = 5 + 8 + 3 + 2
      | c = 
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = 26^3
      | r = 17576
      | c = 
}}
{{eqn | l = 26
      | r = 1 + 7 + 5 + 7 + 6
      | c = 
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = 27^3
      | r = 19683
      | c = 
}}
{{eqn | l = 27
      | r = 1 + 9 + 6 + 8 + 3
      | c = 
}}
{{end-eqn}}
A quick empirical test shows that when $n = 46$, it is already too large to be the sum of the digits of its cube.
For $46 < n \le 54$, $n^3 \le 54^3 < 200 \, 000$.
Hence the sum of the digits of $n^3$ is less than:
:$1 + 5 \times 9 = 46 < n$
For $54 < n < 100$, $n^3 < 10^6$.
Hence the sum of the digits of $n^3$ is less than:
:$6 \times 9 = 54 < n$
For $n \ge 100$, let $n$ be a $d$-digit number, where $d \ge 3$.
Then $10^{d - 1} \le n < 10^d$ and $n^3 < 10^{3 d}$.
Hence the sum of the digits of $n^3$ is less than:
{{begin-eqn}}
{{eqn | l = 3 d \times 9
      | r = 27 d
}}
{{eqn | o = \le
      | r = 27 d + 63 d - 189
}}
{{eqn | o = <
      | r = 90 d - 170
}}
{{eqn | r = 10 \paren {1 + 9 \paren {d - 2} }
}}
{{eqn | o = \le
      | r = 10 \times \paren {1 + 9}^{d - 2}
      | c = Bernoulli's Inequality
}}
{{eqn | o = \le
      | r = n
}}
{{end-eqn}}
so no numbers greater than $46$ can have this property.
{{qed}}
Theorem: Partial Derivatives of Solution of Hamilton-Jacobi Equation are First Integrals of Euler's Equations

Let $\mathbf y = \sequence {y_i}_{1 \mathop \le i \mathop \le n}$, $\bsalpha = \sequence {\alpha_i}_{1 \mathop \le i \mathop \le m}$ be vectors, where $m \le n$.
Let $S = \map S {x, \mathbf y, \bsalpha}$ be a solution of the Hamilton-Jacobi equation, where $\bsalpha$ are parameters.
Then each partial derivative:
:$\dfrac {\partial S} {\partial \alpha_i}$
is a first integral of canonical Euler's equations.

Proof:
Consider the total derivative of $\dfrac {\partial S} {\partial \alpha_i}$ {{WRT|Differentiation}} $x$:
{{begin-eqn}}
{{eqn | l = \frac \d {\d x} \frac {\partial S} {\partial \alpha_i}
      | r = \frac {\partial^2 S} {\partial x \partial\alpha_i} + \sum_{j \mathop = 1}^n \frac {\partial^2 S} {\partial y_j \partial \alpha_i} \frac {\d y_j} {\d x} + \sum_{j \mathop = 1}^m + \frac {\partial^2 S} {\partial \alpha_j \partial \alpha_i} \frac {\d \alpha_j} {\d x}
      | c = Total derivative of $S$ {{WRT|Differentiation}} $x$
}}
{{eqn | r = \frac {\partial^2 S} {\partial x \partial \alpha_i} + \sum_{j \mathop = 1}^n \frac {\partial^2 S} {\partial y_j \partial \alpha_i} \frac {\d y_j} {\d x}
      | c = $ \alpha_i$ is parameter, independent of $x$
}}
{{eqn | r = -\frac {\partial H} {\partial \alpha_i} + \sum_{j \mathop = 1}^n \frac {\partial^2 S} {\partial y_j \partial \alpha_i} \frac {\d y_j} {\d x}
      | c = $S$ satisfies Hamilton-Jacobi equation
}}
{{eqn | r = -\frac {\partial x} {\partial \alpha_i} \frac {\partial H} {\partial x} - \sum_{j \mathop = 1}^n \frac {\partial y_j} {\partial \alpha_i} \frac {\partial H} {\partial y_j} - \sum_{j \mathop = 1}^n \frac {\partial p_j} {\partial \alpha_i} \frac {\partial H} {\partial p_j} + \sum_{j \mathop = 1}^n \frac {\partial^2 S} {\partial y_j \partial \alpha_i} \frac {\d y_j} {\d x}
      | c = Partial derivative of multivariate composite function $\map H {x, \mathbf y, \mathbf p}$
}}
{{eqn | r = -\sum_{j \mathop = 1}^n \frac {\partial^2 S} {\partial y_j \partial \alpha_i} \frac {\partial H} {\partial p_j} + \sum_{j \mathop = 1}^n \frac {\partial^2 S} {\partial y_j \partial \alpha_i} \frac {\partial y_j} {\partial x}    
      | c = $x$, $y_j$ independent of $\alpha_i$; $S$ satisfies Hamilton-Jacobi equation, thus $p_j = \dfrac {\partial S} {\partial y_j}$
}}
{{eqn | r = \sum_{j \mathop = 1}^n \map {\frac {\partial^2 S} {\partial y_j \partial \alpha_i} } {\frac {\d y_j} {\d x} - \frac {\partial H} {\partial p_j} }    
}}
{{end-eqn}}
If Euler's equations are satisfied, the {{RHS}} vanishes.
Hence
:$\dfrac \d {\d x} \dfrac {\partial S} {\partial \alpha_i} = 0$
or:
:$\dfrac {\partial S} {\partial \alpha_i} = C_i$
where $C_i$ is a constant.
{{qed}}
Theorem: Jacobi's Theorem

Let $\mathbf y = \sequence {y_i}_{1 \le i \le n}$, $\boldsymbol \alpha = \sequence {\alpha_i}_{1 \le i \le n}$, $\boldsymbol \beta = \sequence {\beta_i}_{1 \le i \le n}$ be vectors, where $\alpha_i$ and $ \beta_i$ are parameters.
Let $S = \map S {x, \mathbf y, \boldsymbol \alpha}$ be a a complete solution of the Hamilton-Jacobi equation.
Let:
:$\begin {vmatrix} \dfrac {\partial^2 S} {\partial \alpha_i \partial y_k} \end{vmatrix} \ne 0$
where $\begin {vmatrix} \cdot \end{vmatrix}$ is a determinant.
Let:
:$\dfrac {\partial S} {\partial \alpha_i} = \beta_i$
Then:
:$p_i = \map {\dfrac {\partial S} {\partial y_i} } {x, \mathbf y, \boldsymbol \alpha}$
:$y_i = \map {y_i} {x, \boldsymbol \alpha, \boldsymbol \beta}$
constitute a general solution of the canonical Euler's equations.

Proof:
Consider canonical Euler's equations:
:$\dfrac {\d y_i} {\d x} = \dfrac {\partial H} {\partial p_i}$
:$\dfrac {\d p_i} {\d x} = -\dfrac {\partial H} {\partial y_i}$
Apply a canonical transformation:
:$\tuple {x, \mathbf y, \mathbf p, H} \to \tuple {x, \boldsymbol \alpha, \boldsymbol \beta, H^*}$
where $\Phi = S$.
By Conditions for Transformation to be Canonical:
:$p_i = \dfrac {\partial S} {\partial y_i}$
:$\beta_i = \dfrac {\partial S} {\partial \alpha_i}$
:$H^* = H + \dfrac {\partial S} {\partial x}$
Because $S$ is a solution to the Hamilton-Jacobi equation:
:$H^* = 0$
In these new coordinates canonical Euler's equations are:
:$\dfrac {\d\alpha_i} {\d x} = \dfrac {\partial H^*} {\partial \beta_i}$
:$\dfrac {\d \beta_i} {\d x} = -\dfrac {\partial H^*} {\partial \alpha_i}$
By $H^* = 0$:
:$\dfrac {\d \alpha_i} {\d x} = 0$
:$\dfrac {\d\beta_i} {\d x} = 0$
which imply that $ \alpha_i$ and $\beta_i$ are constant along each extremal.
{{explain|the meaning of "extremal"}}
$\beta_i$ constancy provides with $n$ first integrals:
:$\dfrac {\partial S} {\partial \alpha_i} = \beta_i$
Because $S = \map S {x, \mathbf y, \boldsymbol \alpha}$, the aforementioned set of first integrals is also a system of equations for functions $y_i$.
Thus, functions $y_i$ can be found.
Functions $p_i$ are found by the results of Conditions for Transformation to be Canonical:
:$p_i = \dfrac {\partial} {\partial y_i} \map S {x, \mathbf y, \boldsymbol \alpha}$
Then:
:$\map {y_i} {x, \boldsymbol \alpha, \boldsymbol \beta}$
:$\map {p_i} {x, \boldsymbol \alpha, \boldsymbol \beta}$
are solutions to canonical Euler's equations.
{{qed}}
Theorem: Equivalence of Definitions of Principal Ideal of Preordered Set

Let $\struct {S, \preceq}$ be a preordered set.
Let $I$ be an ideal in $S$.
{{TFAE|def = Principal Ideal of Preordered Set}}

Proof:
=== Definition $1$ implies Definition $2$ ===
Assume that
:$\exists x \in I: x$ is upper bound for $I$
We will prove that
:$I \subseteq x^\preceq$
Let $y \in I$.
By definition of upper bound:
:$y \preceq x$
Thus by definition of lower closure of element:
:$y \in x^\preceq$
{{qed|lemma}}
We will prove that
:$x^\preceq \subseteq I$
Let $y \in x^\preceq$.
By definition of lower closure of element:
:$y \preceq x$
Thus by definition of lower section:
:$y \in I$
{{qed|lemma}}
Thus by definition of set equality:
:$\exists x \in S: I = x^\preceq$
{{qed|lemma}}
Theorem: Seventeen Different Wallpaper Patterns

There are $17$ different symmetry groups for a wallpaper pattern.

Proof:
{{ProofWanted|Lots of background work needed.}}
Theorem: Smallest Odd Number not of form 2 a squared plus p

$17$ is the smallest odd number $n$ greater than $3$ which cannot be expressed in the form:
:$n = 2 a^2 + p$
where:
:$p$ is prime
:$a \in \Z_{>0}$ is a (strictly) positive integer.

Proof:
First note that $3$ is not so expressible:
{{begin-eqn}}
{{eqn | l = 3 - 2 \times 1^2
      | r = 1
      | c = which is not prime
}}
{{end-eqn}}
and so $3$ cannot be written in such a form.
Then we have:
{{begin-eqn}}
{{eqn | l = 5
      | r = 2 \times 1^2 + 3
      | c = 
}}
{{eqn | l = 7
      | r = 2 \times 1^2 + 5
      | c = 
}}
{{eqn | l = 9
      | r = 2 \times 1^2 + 7
      | c = 
}}
{{eqn | l = 11
      | r = 2 \times 2^2 + 3
      | c = 
}}
{{eqn | l = 13
      | r = 2 \times 1^2 + 11
      | c = 
}}
{{eqn | r = 2 \times 2^2 + 5
      | c = 
}}
{{eqn | l = 15
      | r = 2 \times 1^2 + 13
      | c = 
}}
{{eqn | r = 2 \times 2^2 + 7
      | c = 
}}
{{end-eqn}}
However, we have:
{{begin-eqn}}
{{eqn | l = 17 - 2 \times 1^2
      | r = 15
      | c = which is not prime
}}
{{eqn | l = 17 - 2 \times 2^2
      | r = 9
      | c = which is not prime
}}
{{end-eqn}}
{{qed}}
Theorem: Compact Element iff Principal Ideal

Let $L = \struct {S, \vee, \preceq}$ be a bounded below join semilattice.
Let $P = \struct {\map {\operatorname {Ids} } L, \precsim}$ be an inclusion ordered set
where
:$\map {\operatorname {Ids} } L$ denotes the set of all ideals in $L$,
:$\mathord\precsim = \mathord\subseteq \cap \paren {\map {\operatorname {Ids} } L \times \map {\operatorname {Ids} } L}$
Let $x \in \map {\operatorname {Ids} } L$
Then $x$ is compact element {{iff}} $x$ is principal ideal in $L$.

Proof:
By Ideals are Continuous Lattice Subframe of Power Set:
:$P$ is continuous lattice subframe of $\struct {\powerset S, \subseteq'}$
where 
:$\powerset S$ denotes the power set of $S$,
:$\mathord\subseteq' = \mathord\subseteq \cap \struct {\powerset S \times \powerset S}$
Theorem: Integers as Sum of Three Pairwise Coprime Integers

Let $n$ be an integer greater than $17$.
Then $n$ is the sum of $3$ integers greater than $1$ which are pairwise coprime.

Proof:
=== Case $1$: $n$ is even ===
There is some integer $k > 2$ such that one of the following holds:
:$n = 6 k = 2 + 3 + \paren {6 k - 5}$
:$n = 6 k + 2 = 4 + 3 + \paren {6 k - 7}$
:$n = 6 k + 4 = 2 + 3 + \paren {6 k - 5}$
All terms are greater than $1$.
The first two terms are powers of $2$ and $3$, so they are coprime.
The last term is not divisible by $2$ or $3$, so the three numbers are pairwise coprime.
{{qed|lemma}}
Theorem: Reversal formed by Repdigits of Base minus 1 by Addition and Multiplication

Let $b \in \Z_{>1}$ be an integer greater than $1$.
Let $n = b^k - 1$ for some integer $k$ such that $k \ge 1$.
Then:
: $n + n$ is the reversal of $\paren {b - 1} n$
when both are expressed in base $b$ representation.

Proof:
By Power of Base minus 1 is Repdigit Base minus 1, $n$ is a repdigit number consisting of $k$ occurrences of $b - 1$.
Let $a = b - 1$.
Thus $n$ can be expressed in base $b$ as:
:$n = {\overbrace {\sqbrk {aaa \cdots a} }^k}_b$
We have that:
{{begin-eqn}}
{{eqn | l = n + n
      | r = 2 n
      | c = 
}}
{{eqn | r = \sqbrk {1aa \cdots ac}_b
      | c = Multiple of Repdigit Base minus 1: $k - 1$ occurrences of $a$, and $c = b - 2$
}}
{{end-eqn}}
where there are:
:$k - 1$ occurrences of $a$
:$c = b - 2$.
Then:
{{begin-eqn}}
{{eqn | l = \paren {b - 1} \times n
      | r = a n
      | c = 
}}
{{eqn | r = \sqbrk {caa \cdots a1}_b
      | c = Multiple of Repdigit Base minus 1
}}
{{end-eqn}}
where there are:
:$k - 1$ occurrences of $a$
:$c = b - 2$.
Hence the result.
{{qed}}
Theorem: Power of Base minus 1 is Repdigit Base minus 1

Let $b \in \Z_{>1}$ be an integer greater than $1$.
Let $n = b^k - 1$ for some integer $k$ such that $k \ge 1$.
Let $n$ be expressed in base $b$ representation.
Then $n$ is a repdigit number consisting of $k$ instances of digit $b - 1$.

Proof:
{{begin-eqn}}
{{eqn | l = \dfrac {b^k - 1} {b - 1}
      | r = \sum_{j \mathop = 0}^{k - 1} b^j
      | c = Sum of Geometric Sequence
}}
{{eqn | ll= \leadsto
      | l = n = b^k - 1
      | r = \paren {b - 1} \sum_{j \mathop = 0}^{k - 1} b^j
      | c = 
}}
{{eqn | r = \sum_{j \mathop = 0}^{k - 1} \paren {b - 1} b^j
      | c = 
}}
{{end-eqn}}
Thus, by the definition of base $b$ representation, $n$ consists of $k$ occurrences of the digit $b - 1$.
{{qed}}
Category:Repdigit Numbers
Category:Number Bases
hlz3zhxqaz2mksqgr4ujeit2i9k9wdu
Theorem: Multiple of Repdigit Base minus 1

Let $b \in \Z_{>1}$ be an integer greater than $1$.
Let $n$ be a repdigit number of $k$ instances of the digit $b - 1$ for some integer $k$ such that $k \ge 1$.
Let $m \in \Z_{>1}$ be an integer such that $1 < m < b$.
Then $m \times n$, when expressed in base $b$, is of the form:
:$m n = \sqbrk {r d d \cdots d s}_b$
where:
:$d = b - 1$
:$r = m - 1$
:$s = b - m$
:there are $k - 1$ occurrences of $d$.

Proof:
{{begin-eqn}}
{{eqn | l = n
      | r = \sum_{j \mathop = 0}^{k - 1} \paren {b - 1} b^j
      | c = Basis Representation Theorem
}}
{{eqn | r = b^k - 1
      | c = Sum of Geometric Sequence
}}
{{eqn | ll= \leadsto
      | l = m n
      | r = m \paren {b^k - 1}
      | c = 
}}
{{eqn | r = \paren {m - 1} b^k + b^k - 1 + 1 - m
      | c = 
}}
{{eqn | r = \paren {m - 1} b^k + \sum_{j \mathop = 0}^{k - 1} \paren {b - 1} b^j + \paren {1 - m}
      | c = Sum of Geometric Sequence
}}
{{eqn | r = \paren {m - 1} b^k + \sum_{j \mathop = 1}^{k - 1} \paren {b - 1} b^j + \paren {b - 1} + \paren {1 - m}
      | c = 
}}
{{eqn | r = \paren {m - 1} b^k + \sum_{j \mathop = 1}^{k - 1} \paren {b - 1} b^j + \paren {b - m}
      | c = 
}}
{{end-eqn}}
which is exactly the representation $\sqbrk {r d d \cdots d s}_b$ as defined.
{{qed}}
Theorem: Only Number Twice Sum of Digits is 18

There exists only one (strictly) positive integer that is exactly twice the sum of its digits.

Proof:
Let $n$ be equal to twice the sum of its digits.
Suppose $n$ has $1$ digit.
Then $n$ equals the sum of its digits.
Thus $n$ does not have only $1$ digit.
Suppose $n$ has $3$ digits.
Then $n > 99$.
But the highest number that can be formed by the sum of $3$ digits is $9 + 9 + 9 = 27$.
Similarly for if $n$ has more than $3$ digits.
Hence, if there exists such a number, it must have exactly $2$ digits.
Let the $2$ digits of $n$ be $x$ and $y$.
Thus:
{{begin-eqn}}
{{eqn | l = n
      | r = 10 x + y
      | c = 
}}
{{eqn | r = 2 \left({x + y}\right)
      | c = 
}}
{{eqn | ll= \leadsto
      | l = 8 x
      | r = y
      | c = 
}}
{{end-eqn}}
Since $x$ and $y$ are both single digits, it follows that $x = 1$ and $y = 8$.
Hence the result.
{{qed}}
Theorem: Long Period Prime/Examples/19

The prime number $19$ is a long period prime:
:$\dfrac 1 {19} = 0 \cdotp \dot 05263 \, 15789 \, 47368 \, 42 \dot 1$

Proof:
From Reciprocal of $19$:
{{:Reciprocal of 19}}
Counting the digits, it is seen that this has a period of recurrence of $18$.
Hence the result.
{{qed}}
Theorem: Divisibility by 19

Let $n$ be an integer expressed in the form:
:$n = 100 a + b$
Then $n$ is divisible by $19$ {{iff}} $a + 4 b$ is divisible by $19$.

Proof:
Let $a, b, c \in \Z$.
{{begin-eqn}}
{{eqn | l = 100 a + b
      | r = 19 c
      | c = 
}}
{{eqn | ll= \leadstoandfrom
      | l = 400 a + 4 b
      | r = 19 \paren {4 c}
      | c = Multiply by $4$
}}
{{eqn | ll= \leadstoandfrom
      | l = 399 a + a + 4 b
      | r = 19 \paren {4 c}
      | c = Separate the $a$ values
}}
{{eqn | ll= \leadstoandfrom
      | l = 19 \paren {21 a} + a + 4 b
      | r = 19 \paren {4 c}
      | c = Factor out $19$
}}
{{eqn | ll= \leadstoandfrom
      | l = a + 4 b
      | r = 19 \paren {4 c - 21 a}
      | c = Subtract
}}
{{end-eqn}}
{{qed}}
Theorem: Diameter of Closure of Subset is Diameter of Subset

Let $M = \struct {A, d}$ be a metric space.
Let $S \subseteq A$ be bounded in $M$.
Then:
:$\map \diam S = \map \diam {S^-}$
where $\map \diam S$ denotes the diameter of $S$, and $S^-$ denotes the closure of $S$ in $M$.

Proof:
{{AimForCont}} that $\map \diam S \ne \map \diam {S^-}$.
$S \subseteq S^-$ by Subset of Metric Space is Subset of its Closure, so it then follows that:
:$\map \diam S < \map \diam {S^-}$
Then there exists $x, y \in S^-$ such that $\map d {x, y} > \map \diam S$.
By Point in Closure of Subset of Metric Space iff Limit of Sequence there exists sequences $\sequence {x_n}$ and $\sequence {y_n}$ that converge to $x$ and $y$ respectively.
Let $d_\infty: \paren {A \times A} \times \paren {A \times A} \to \R$ be the metric on $A \times A$ defined as:
:$\map {d_\infty} {\tuple {x, y}, \tuple {x', y'} } = \max \set {\map d {x, x'}, \map d {y, y'} }$
From this it can be said that $\sequence {\tuple {x_n, y_n} }$ is a sequence of points in $A \times A$ that converge to $\tuple {x, y}$.
Let $\epsilon = \map d {x, y} - \map \diam S$.
From Distance Function of Metric Space is Continuous, there exists a $N \in \N_{> 0}$ such that:
:$n \ge N \implies \size {\map d {x_n, y_n} - \map d {x, y} } < \epsilon$
If $\map d {x_n, y_n} - \map d {x, y}$ is non-negative, then:
:$\map d {x_n, y_n} \ge \map d {x, y} > \map \diam S$
which is a contradiction.
If $\map d {x_n, y_n} - \map d {x, y}$ is a negative number, then:
{{begin-eqn}}
{{eqn | l = \size {\map d {x_n, y_n} - \map d {x, y} }
      | r = -\map d {x_n, y_n} + \map d {x, y}
}}
{{eqn | o = <
      | r = \map d {x, y} - \map \diam S
}}
{{eqn | ll= \leadsto
      | l = -\map d {x_n, y_n}
      | o = <
      | r = -\map \diam S
}}
{{eqn | ll= \leadsto
      | l = \map d {x_n, y_n}
      | o = >
      | r = \map \diam S
}}
{{end-eqn}}
which is again a contradiction.
From Proof by Contradiction it follows that $\map \diam S = \map \diam {S^-}$.
Hence the result.
{{qed}}