OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
N:= 3: # to get extensions of all palindromes of <= N digits
f:= proc(n) local d, x;
for d from 1 do
x:= ceil((n*10^d)^(1/3));
if x^3 < (n+1)*10^d then return x fi
od
end proc:
digrev:= proc(n) local i, L;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
Res:= seq(f(i), i=1..9):
for d from 2 to N do
if d::even then
m:= d/2;
Res:= Res, seq(f(n*10^m + digrev(n)), n=10^(m-1)..10^m-1);
else
m:= (d-1)/2;
Res:= Res, seq(seq(f(n*10^(m+1)+y*10^m+digrev(n)), y=0..9), n=10^(m-1)..10^m-1)
fi
od: Res; # Robert Israel, Dec 25 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved