OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
revdigs:= proc(n)
local L, nL, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L));
end:
g:= proc(d) local m, x, y;
if d::even then
m:= d/2;
seq(x*10^m+revdigs(x), x=10^(m-1)..10^m-1)
else
m:= (d-1)/2;
seq(seq(x*10^(m+1)+y*10^m+revdigs(x), y=0..9), x=10^(m-1)..10^m-1)
fi
end proc:
g(1):= $1..9:
f:= proc(x) local d, y;
for d from 1 do
y:= ceil(sqrt(x*10^d));
if y^2 < (x+1)*10^d then return y fi
od;
end proc:
map(f, [g(1), g(2), g(3), g(4)]); # Robert Israel, Aug 12 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved