|
|
A263608
|
|
Palindromes which are base-3 representations of squares.
|
|
4
|
|
|
0, 1, 11, 121, 10201, 11111, 112211, 122221, 1002001, 1120211, 11022011, 100020001, 101212101, 122111221, 1012112101, 1100220011, 10000200001, 10111011101, 110002200011, 111221122111, 1000002000001, 1001221221001, 1012200022101, 1101202021011, 1221221221221, 10101111110101
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
MAPLE
|
rev3:= proc(n) local L, i; L:= convert(n, base, 3); add(L[-i]*3^(i-1), i=1..nops(L)) end proc:
c3:= proc(n) local L, i; L:= convert(n, base, 3); add(L[i]*10^(i-1), i=1..nops(L)) end proc:
R:= 0, 1: count:= 2:
for d from 2 while count < 100 do
if d::odd then
V:= select(issqr, [seq(seq(a*3^((d+1)/2) + b*3^((d-1)/2)+rev3(a), b=0..2), a=3^((d-3)/2) .. 3^((d-1)/2)-1)])
else
V:= select(issqr, [seq(a*3^(d/2) + rev3(a), a=3^(d/2-1) .. 3^(d/2)-1)]);
fi;
count:= count+nops(V);
R:= R, op(map(c3, V));
od:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|