A056641 Least positive integer k for which (b+1)^k is not palindromic in base b, b = 2, 3, 4, ...
4, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 2
Examples
The 4th term is 4 because base 5 representations of (5+1)^1 = 11, (5+1)^2 = 121, (5+1)^3 = 1331, are all palindromic, while (5+1)^4 = 20141 is not.
Programs
-
Mathematica
palq[x_] := x == Reverse[x] Table[x = 0; While[palq[IntegerDigits[(t + 1)^x, t]], ++x]; x, {t, START, FINISH}] (* Dylan Hamilton, Aug 15 2010 *)
Comments