Theorem: Consecutive Integers whose Sums of Squares of Divisors are Equal

The only two consecutive positive integers whose sums of the squares of their divisors are equal are $6$ and $7$.

Proof:
The divisors of $6$ are
:$1, 2, 3, 6$
and so the sum of the squares of the divisors of $6$ is:
:$1^2 + 2^2 + 3^2 + 6^2 = 1 + 4 + 9 + 36 = 50$
The divisors of $7$ are
:$1, 7$
and so the sum of the squares of the divisors of $7$ is:
:$1^2 + 7^2 = 1 + 49 = 50$
It remains to be shown that there are no more.
Let $n \ge 7$ be an odd number.
Then both $n - 1$ and $n + 1$ are even.
Denote $\map {\sigma_2} n$ the sum of squares of the divisors of $n$.
We will show that:
:$\map {\sigma_2} {n + 1} > \map {\sigma_2} n$
:$\map {\sigma_2} {n - 1} > \map {\sigma_2} n$ for $n \ge 151$
Since:
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} n
      | r = \sum_{d \mathop \divides n} d^2
}}
{{eqn | r = \sum_{d \mathop \divides n} \paren {\frac n d}^2
}}
{{eqn | r = n^2 \sum_{d \mathop \divides n} \paren {\frac 1 d}^2
}}
{{eqn | o = <
      | r = n^2 \sum_{d \text{ odd} } \paren {\frac 1 d}^2
      | c = since $n$ is odd
}}
{{eqn | r = \frac {n^2 \pi^2} 8
      | c = Sum of Reciprocals of Squares of Odd Integers
}}
{{eqn | l = \map {\sigma_2} {n \pm 1}
      | r = \sum_{d \mathop \divides n \pm 1} d^2
}}
{{eqn | o = \ge
      | r = 1^2 + 2^2 + \paren {\frac {n \pm 1} 2}^2 + \paren {n \pm 1}^2
      | c = since $n \pm 1$ is even and $n - 1 > 4$
}}
{{eqn | r = \frac 5 4 n^2 \pm \frac 5 2 n + \frac {15} 2
}}
{{end-eqn}}
Therefore:
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} {n + 1}
      | r = \frac 5 4 n^2 + \frac 5 2 n + \frac {15} 2
}}
{{eqn | o = >
      | r = \frac {\pi^2} 8 n^2
}}
{{eqn | o = >
      | r = \map {\sigma_2} n
}}
{{end-eqn}}
and for $n - 1$:
:$\map {\sigma_2} {n - 1} - \map {\sigma_2} n = \dfrac {10 - \pi^2} 8 n^2 - \dfrac 5 2 n + \dfrac {15} 2$
By Solution to Quadratic Equation, the above is greater than zero when:
:$n > \dfrac {\paren {5/2} + \sqrt {\paren {5/2}^2 - 4 \paren {\paren {10 - \pi^2} / 8} \paren {15/2} } } {2 \paren {\paren {10 - \pi^2} / 8} } \approx 150.3$
hence there are no solutions for $\map {\sigma_2} {n - 1} = \map {\sigma_2} n$ for $n \ge 151$.
Our estimate of $\map {\sigma_2} n$ is very rough.
If $n$ is one of the following, we can get sharper estimates:
Suppose $n = p^k$ for a prime $p \ge 3$ and $k \ge 1$.
Then:
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} n
      | r = \sum_{i \mathop = 0}^k p^{2 i}
      | c = Divisors of Power of Prime
}}
{{eqn | r = n^2 \sum_{i \mathop = 0}^k \frac 1 {p^{2 i} }
}}
{{eqn | o = <
      | r = n^2 \sum_{i \mathop = 0}^\infty \frac 1 {p^{2 i} }
}}
{{eqn | r = \frac {n^2} {1 - \frac 1 {p^2} }
      | c = Sum of Infinite Geometric Sequence/Corollary 2
}}
{{eqn | r = n^2 \paren {1 + \frac 1 {p^2 - 1} }
}}
{{eqn | o = \le
      | r = n^2 \paren {1 + \frac 1 {3^2 - 1} }
}}
{{eqn | r = \frac 9 8 n^2
}}
{{end-eqn}}
We have:
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} {n - 1} - \map {\sigma_2} n
      | o = >
      | r = \paren {\frac 5 4 - \frac 9 8} n^2 - \frac 5 2 n + \frac {15} 2
}}
{{eqn | r = \frac 1 8 \paren {n^2 - 20 n + 60}
}}
{{eqn | r = \frac 1 8 \paren {n - 10}^2 - 5
}}
{{end-eqn}}
The above is greater than $0$ when $n \ge 17$.
Suppose $n = p q$, where $p, q \ge 3$ are primes and $p \ne q$.
Then:
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} n
      | r = 1^2 + p^2 + q^2 + p^2 q^2
      | c = Product of Two Distinct Primes has 4 Positive Divisors
}}
{{eqn | r = n^2 \paren {1 + \frac 1 {p^2} + \frac 1 {q^2} + \frac 1 {n^2} }
}}
{{eqn | o = \le
      | r = n^2 \paren {1 + \frac 1 {3^2} + \frac 1 {5^2} + \frac 1 {15^2} }
}}
{{eqn | r = \frac {52} {45} n^2
}}
{{eqn | o = <
      | r = \frac 9 8 n^2
}}
{{end-eqn}}
We have:
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} {n - 1} - \map {\sigma_2} n
      | o = >
      | r = \paren {\frac 5 4 - \frac 52 45} n^2 - \frac 5 2 n + \frac {15} 2
}}
{{eqn | r = \frac {17} {180} \paren {n^2 - \frac {450} {17} n} + \frac {15} 2
}}
{{eqn | r = \frac {17} {180} \paren {n - \frac {225} {17} }^2 - \frac {615} {68}
}}
{{end-eqn}}
The above is greater than $0$ when $n \ge 25$.
Therefore we just need to check the following $n \le 149$:
:$3, 5, 7, 9, 11, 13, 15, 21, 45, 63, 75, 99, 105, 117, 135, 147$
{{begin-eqn}}
{{eqn | l = \map {\sigma_2} 1
      | r = 1^2
}}
{{eqn | r = 1
}}
{{eqn | l = \map {\sigma_2} 2
      | r = 1^2 + 2^2
}}
{{eqn | r = 5
}}
{{eqn | l = \map {\sigma_2} 3
      | r = 1^2 + 3^3
}}
{{eqn | r = 10
}}
{{eqn | l = \map {\sigma_2} 4
      | r = 1^2 + 2^2 + 4^2
}}
{{eqn | r = 21
}}
{{eqn | l = \map {\sigma_2} 5
      | r = 1^2 + 5^2
}}
{{eqn | r = 26
}}
{{eqn | l = \map {\sigma_2} 6
      | r = 1^2 + 2^2 + 3^2 + 6^2
}}
{{eqn | r = 50
}}
{{eqn | l = \map {\sigma_2} 7
      | r = 1^2 + 7^2
}}
{{eqn | r = 50
}}
{{eqn | l = \map {\sigma_2} 8
      | r = 1^2 + 2^2 + 4^2 + 8^2
}}
{{eqn | r = 85
}}
{{eqn | l = \map {\sigma_2} 9
      | r = 1^2 + 3^2 + 9^2
}}
{{eqn | r = 91
}}
{{eqn | l = \map {\sigma_2} {10}
      | r = 1^2 + 2^2 + 5^2 + 10^2
}}
{{eqn | r = 130
}}
{{eqn | l = \map {\sigma_2} {11}
      | r = 1^2 + 11^2
}}
{{eqn | r = 122
}}
{{eqn | l = \map {\sigma_2} {12}
      | r = 1^2 + 2^2 + 3^2 + 4^2 + 6^2 + 12^2
}}
{{eqn | r = 210
}}
{{eqn | l = \map {\sigma_2} {13}
      | r = 1^2 + 13^2
}}
{{eqn | r = 170
}}
{{eqn | l = \map {\sigma_2} {14}
      | r = 1^2 + 2^2 + 7^2 + 14^2
}}
{{eqn | r = 250
}}
{{eqn | l = \map {\sigma_2} {15}
      | r = 1^2 + 3^2 + 5^2 + 15^2
}}
{{eqn | r = 260
}}
{{eqn | l = \map {\sigma_2} {20}
      | r = 1^2 + 2^2 + 4^2 + 5^2 + 10^2 + 20^2
}}
{{eqn | r = 546
}}
{{eqn | l = \map {\sigma_2} {21}
      | r = 1^2 + 3^2 + 7^2 + 21^2
}}
{{eqn | r = 500
}}
{{eqn | l = \map {\sigma_2} {44}
      | r = 1^2 + 2^2 + 4^2 + 11^2 + 22^2 + 44^2
}}
{{eqn | r = 2562
}}
{{eqn | l = \map {\sigma_2} {45}
      | r = 1^2 + 3^2 + 5^2 + 9^2 + 15^2 + 45^2
}}
{{eqn | r = 2366
}}
{{eqn | l = \map {\sigma_2} {62}
      | r = 1^2 + 2^2 + 31^2 + 62^2
}}
{{eqn | r = 4810
}}
{{eqn | l = \map {\sigma_2} {63}
      | r = 1^2 + 3^2 + 7^2 + 9^2 + 21^2 + 63^2
}}
{{eqn | r = 4550
}}
{{eqn | l = \map {\sigma_2} {74}
      | r = 1^2 + 2^2 + 37^2 + 74^2
}}
{{eqn | r = 6850
}}
{{eqn | l = \map {\sigma_2} {75}
      | r = 1^2 + 3^2 + 5^2 + 15^2 + 25^2 + 75^2
}}
{{eqn | r = 6510
}}
{{eqn | l = \map {\sigma_2} {98}
      | r = 1^2 + 2^2 + 7^2 + 14^2 + 49^2 + 98^2
}}
{{eqn | r = 12255
}}
{{eqn | l = \map {\sigma_2} {99}
      | r = 1^2 + 3^2 + 9^2 + 11^2 + 33^2 + 99^2
}}
{{eqn | r = 11102
}}
{{eqn | l = \map {\sigma_2} {104}
      | r = 1^2 + 2^2 + 4^2 + 8^2 + 13^2 + 26^2 + 52^2 + 104^2
}}
{{eqn | r = 14450
}}
{{eqn | l = \map {\sigma_2} {105}
      | r = 1^2 + 3^2 + 5^2 + 7^2 + 15^2 + 21^2 + 35^2 + 105^2
}}
{{eqn | r = 13000
}}
{{eqn | l = \map {\sigma_2} {116}
      | r = 1^2 + 2^2 + 4^2 + 29^2 + 58^2 + 116^2
}}
{{eqn | r = 17682
}}
{{eqn | l = \map {\sigma_2} {117}
      | r = 1^2 + 3^2 + 9^2 + 13^2 + 39^2 + 117^2
}}
{{eqn | r = 15470
}}
{{eqn | l = \map {\sigma_2} {134}
      | r = 1^2 + 2^2 + 67^2 + 134^2
}}
{{eqn | r = 22450
}}
{{eqn | l = \map {\sigma_2} {135}
      | r = 1^2 + 3^2 + 5^2 + 9^2 + 15^2 + 27^2 + 45^2 + 135^2
}}
{{eqn | r = 21320
}}
{{eqn | l = \map {\sigma_2} {146}
      | r = 1^2 + 2^2 + 73^2 + 146^2
}}
{{eqn | r = 26650
}}
{{eqn | l = \map {\sigma_2} {147}
      | r = 1^2 + 3^2 + 7^2 + 21^2 + 49^2 + 147^2
}}
{{eqn | r = 24510
}}
{{end-eqn}}
and thus the only pair is $\map {\sigma_2} 6 = \map {\sigma_2} 7 = 50$.
We have also inadvertently proved that $\map {\sigma_2} {2 n} > \map {\sigma_2} {2 n + 1}$ for $n \ge 8$.
{{qed}}