/- 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

Smallest palindrome with exactly $n$ divisors

The sequence $a(n)$ is the smallest palindromic number with exactly $n$ divisors, or $0$ if no such number exists.

References:

namespace OeisA83753

A natural number $m$ is a decimal palindrome if its base-$10$ digits read the same forwards and backwards.

def IsDecimalPalindrome (m : ) : Prop := Nat.digits 10 m = (Nat.digits 10 m).reverseinstance (m : ) : Decidable (IsDecimalPalindrome m) := inferInstanceAs (Decidable (Nat.digits 10 m = (Nat.digits 10 m).reverse))open Classical in

Smallest positive palindrome with exactly $n$ divisors, or $0$ if no such number exists.

noncomputable def a (n : ) : := if h : m, 0 < m IsDecimalPalindrome m (Nat.divisors m).card = n then Nat.find h else 0

Value of the sequence a at 1.

h: m, 0 < m IsDecimalPalindrome m m.divisors.card = 1(0 < 1 IsDecimalPalindrome 1 (Nat.divisors 1).card = 1) n < 1, ¬(0 < n IsDecimalPalindrome n n.divisors.card = 1) All goals completed! 🐙 h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 1False exact (h 1, h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 10 < 1 IsDecimalPalindrome 1 (Nat.divisors 1).card = 1 All goals completed! 🐙).elim

Value of the sequence a at 2.

h: m, 0 < m IsDecimalPalindrome m m.divisors.card = 2(0 < 2 IsDecimalPalindrome 2 (Nat.divisors 2).card = 2) n < 2, ¬(0 < n IsDecimalPalindrome n n.divisors.card = 2) All goals completed! 🐙 h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 2False exact (h 2, h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 20 < 2 IsDecimalPalindrome 2 (Nat.divisors 2).card = 2 All goals completed! 🐙).elim

Value of the sequence a at 3.

h: m, 0 < m IsDecimalPalindrome m m.divisors.card = 3(0 < 4 IsDecimalPalindrome 4 (Nat.divisors 4).card = 3) n < 4, ¬(0 < n IsDecimalPalindrome n n.divisors.card = 3) All goals completed! 🐙 h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 3False exact (h 4, h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 30 < 4 IsDecimalPalindrome 4 (Nat.divisors 4).card = 3 All goals completed! 🐙).elim

Value of the sequence a at 4.

h: m, 0 < m IsDecimalPalindrome m m.divisors.card = 4(0 < 6 IsDecimalPalindrome 6 (Nat.divisors 6).card = 4) n < 6, ¬(0 < n IsDecimalPalindrome n n.divisors.card = 4) All goals completed! 🐙 h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 4False exact (h 6, h:¬ m, 0 < m IsDecimalPalindrome m m.divisors.card = 40 < 6 IsDecimalPalindrome 6 (Nat.divisors 6).card = 4 All goals completed! 🐙).elim

There are no palindromic numbers greater than 1 which are the fifth or higher power of a natural number.

@[category research open, AMS 11] theorem conjecture (m k : ) (hm : 1 < m) (hpal : IsDecimalPalindrome m) (hk : 5 k) : ¬ x : , m = x ^ k := m:k:hm:1 < mhpal:IsDecimalPalindrome mhk:5 k¬ x, m = x ^ k All goals completed! 🐙end OeisA83753