/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ import FormalConjecturesUtil

Reversible multiples $a(3^n) = 10^{3^{n-2}} - 1$ for powers of $3$

First multiple of $n$ whose reverse is also divisible by $n$, or 0 if no such multiple exists.

References:

    A062567

    arxiv/2605.22763 Advancing Mathematics Research with AI-Driven Formal Proof Search by George Tsoukalas et al.

namespace OeisA62567open Nat

The number whose digits in base 10 are $n$'s digits reversed.

def reverseNat (k : ) : := ofDigits 10 (digits 10 k).reverseopen Classical in

First multiple of $n$ whose reverse is also divisible by $n$, or 0 if no such multiple exists.

noncomputable def a (n : ) : := if n = 0 then 0 else -- P(k) is the predicate for the multiplier k: k > 0 and n divides the reverse of (k*n). let P (k : ) : Prop := k > 0 n reverseNat (k * n) -- We check if a solution exists (using classical reasoning, since P is decidable). if h_ex : k, P k then -- k_min is the smallest multiplier k >= 1. let k_min : := Nat.find h_ex k_min * n else 0All goals completed! 🐙k:hk0:k 0hk10:k < 10ofDigits 10 [k].reverse = k All goals completed! 🐙All goals completed! 🐙)All goals completed! 🐙)All goals completed! 🐙)All goals completed! 🐙)All goals completed! 🐙)

The conjecture that $a(3^n) = 10^{3^{n-2}} - 1$ for $n > 1$ was shown to be false for $4 < n < 21$ by Farideh Firoozbakht, who conjectured that for all $n > 4$, $a(3^n) \neq 10^{3^{n-2}} - 1$. This latter conjecture is proved here.

A formal proof has been found with the methods described in arxiv/2605.22763.

@[category research solved, AMS 11, formal_proof using formal_conjectures at "https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/62567.wip.lean#L324"] theorem a_three_pow_eq (n : ) : 2 n (a (3 ^ n) = 10 ^ (3 ^ (n - 2)) - 1 n = 2 n = 3 n = 4) := n:2 n (OeisA62567.a (3 ^ n) = 10 ^ 3 ^ (n - 2) - 1 n = 2 n = 3 n = 4) All goals completed! 🐙end OeisA62567