|
|
A065809
|
|
a(n) is the smallest number m > n such that m is palindromic in base n and is not palindromic in bases b with 2 <= b < n.
|
|
1
|
|
|
3, 4, 25, 6, 14, 32, 54, 30, 11, 84, 39, 140, 75, 176, 102, 198, 19, 220, 147, 110, 69, 384, 175, 416, 486, 420, 58, 570, 279, 544, 429, 306, 245, 684, 296, 380, 663, 880, 615, 1134, 258, 1012, 1035, 1104, 47, 1392, 539, 1500, 1071, 1508, 53, 2106
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
COMMENTS
|
Index at which first occurrence of n occurs in A016026 when the palindrome is multidigit. Only the first two terms of A016026 are single-digit palindromes. - Robert G. Wilson v, Dec 22 2021
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 25 since A016026(25) = 4; etc. (End)
|
|
MAPLE
|
N:= 100:
f:= proc(m) local k, L;
for k from 2 to m do
L:= convert(m, base, k);
if L = ListTools:-Reverse(L) then return k fi
od;
FAIL
end proc:
V:= Array(2..N):
count:= 0:
for m from 3 while count < N-1 do
v:= f(m);
if v = FAIL or v > N then next fi;
if V[v] = 0 then count:= count+1; V[v]:= m;
fi
od:
|
|
MATHEMATICA
|
fpb = Compile[{{n, _Integer}}, Module[{b = 2, idn}, While[ Reverse[idn = IntegerDigits[n, b]] != idn, b++]; b]]; k = 3; t[_] := 0; While[k < 2200, a = fpb@ k; If[ t[a] == 0, t[a] = k]; k++]; t@# & /@ Range[2, 53] (* Robert G. Wilson v, Dec 22 2021 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|