A075244 Least number requiring the base n to produce a prime by base reversal.
2, 3, 15, 8, 109, 9, 119, 16, 27, 70, 2197, 36, 1265, 158, 213, 178, 4205, 126, 14189, 260, 273, 304, 4865, 120, 1295, 78, 81, 532, 44323, 150, 47317, 952, 771, 102, 16705, 492, 6209, 114, 1209, 2020, 132743, 294, 22945, 2834, 2721, 2276, 66455, 144
Offset: 1
Examples
a(1) = 2 because two = 11 in unary (A000042) and its reversal 11 = 2. a(2) = 3 because three = 11 in base 2 (A007088) and its reversal 11 in base 2 = 3. a(3) = 15 because fifteen = 120 in base 3 (A007089) and its reversal 21 in base 3 = 7. a(4) = 8 -> 2. a(7) = 119 because 119 base 7 = 230 in base 7 (A007093) and its reversal 32 base 7 = 161.
Programs
-
Mathematica
f[n_] := Block[{b = 2}, While[b < n && !PrimeQ[ FromDigits[ Reverse[ IntegerDigits[n, b]], b]], b++ ]; If[b != n, b, 0]]; a = Table[0, {70}]; Do[b = f[n]; If[b < 76 && a[[b]] == 0, a[[b]] = n], {n, 2, 133000}]
Comments