JSFiddle - React, Tailwind, and code Playground

JavaScript

function f(n){for(var b=2,c,d;d=[];++b){for(c=n;c;c=c/b^0)d.push(c%b);if(d.join()==d.reverse())return b}}


// TESTS

test(11);
test(32);
test(59);
test(111);

function test(n) {
    document.body.appendChild(document.createElement("DIV")).innerHTML = n + " => " + f(n);
}