OFFSET
1,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..106
Patrick De Geest, Palindromic Squares in bases 2 to 17
EXAMPLE
8^2 = 64, which in base 15 is 44, and that's palindromic, so 64 is in the sequence.
9^2 = 81, which in base 15 is 56. Since that's not palindromic, 81 is not in the sequence.
MAPLE
N:= 10^10: # to get all entries <= N
count:= 0:
for x from 0 to floor(sqrt(N)) do
y:= x^2;
L:= convert(y, base, 15);
if ListTools[Reverse](L) = L then
count:= count+1;
A[count]:= y;
fi
od:
seq(A[i], i=1..count); # Robert Israel, Jul 24 2014
MATHEMATICA
palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[Range[0, 2700]^2, palQ[#, 15] &] (* Harvey P. Dale, Apr 23 2011 *)
PROG
(PARI) isok(n) = my(d=digits(n, 15)); issquare(n) && (d == Vecrev(d)); \\ Michel Marcus, Oct 21 2016
CROSSREFS
KEYWORD
base,nonn,changed
AUTHOR
STATUS
approved