login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest base relative to which the n-th prime is palindromic.
1

%I #10 Jun 07 2016 19:18:31

%S 3,2,2,2,10,3,2,18,3,4,2,6,5,6,46,52,4,6,5,7,2,78,5,8,8,10,102,2,5,8,

%T 2,10,136,138,148,3,7,162,166,3,178,10,6,12,6,11,8,222,8,12,3,14,12,8,

%U 2,262,268,7,11,14,282,292,7,310,2,316,15,9,346,8,10,358,366,4,13,10,388

%N Smallest base relative to which the n-th prime is palindromic.

%C Subset of A016026 for primes only.

%H Harvey P. Dale, <a href="/A065437/b065437.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Primes</a>

%e 71 is the 20th prime and can be written as 131 in base 7, hence a(20)=7.

%t PrimeMinBase[ n_ ] := NestWhile[ # + 1 &, 2, IntegerDigits[ Prime[ n ], # ] != Reverse[ IntegerDigits[ Prime[ n ], # ] ] & ]

%t sbr[n_]:=Module[{k=2},While[IntegerDigits[n,k]!=Reverse[ IntegerDigits[ n,k]], k++]; k]; Table[sbr[n],{n,Prime[Range[80]]}] (* _Harvey P. Dale_, Jun 07 2016 *)

%Y Cf. A016026.

%K base,easy,nonn

%O 1,1

%A Peter Bertok (peter(AT)bertok.com), Nov 23 2001