Smaller-Base Palindromes For the purpose of this challenge, a smaller-base palindrome (SBP) is a number which is palindromic in a base between 1 and itself (exclusive), and is not a repdigit in the same base.  For example, 5 is a SBP because it is a palindrome in base 2 (101).  The first few SBPs are 5,9,10,16,17,20,21,23,25,26,27,28,29,33...

Your Task:

Write a program or function that, when given an integer i as input, returns/outputs the ith SBP.  

Input:

An integer i where 0 &lt;= i &lt; 1,000,000.  

Output:

The ith SBP.  

Test Cases:

12 -&gt; 29
18 -&gt; 41


Scoring:

This is code-golf, lowest score in bytes wins!
Python 2, 133 119 bytes

-3 thanks to Ovs

-5 thanks to Lynn

1-indexed



j=i=0
n=input()
while n:
 j+=1;l=[];N=i
 while N:l+=N%j,;N/=j
 if{i%j}&lt;set(l)&gt;l==l[::-1]or j&gt;i:n-=j&lt;i;i+=1;j=1
print~-i


Try it online!