A087988 Palindromic numbers whose squares and cubes are equally palindromic.
0, 1, 2, 11, 101, 111, 1001, 10001, 10101, 11011, 100001, 101101, 110011, 1000001, 1001001, 1100011, 10000001, 10011001, 10100101, 11000011, 100000001, 100010001, 100101001, 101000101, 110000011, 1000000001, 1000110001
Offset: 1
Examples
11^2=121, 11^3=1331.
Programs
-
Maple
rev:=proc(a) local aa,ct: aa:=convert(a,base,10): ct:=nops(aa): add(10^(ct-j)*aa[j],j=1..ct) end: p:=proc(n) if rev(n)=n and rev(n^2)=n^2 and rev(n^3)=n^3 then n else fi end: seq(p(n),n=0..12*10^5); # Emeric Deutsch, May 01 2005
-
PARI
ispal(n) = my(d = digits(n)); Vecrev(d) == d; isok(n) = ispal(n) && ispal(n^2) && ispal(n^3); \\ Michel Marcus, Oct 25 2015
Extensions
More terms from Ray Chandler, Oct 05 2003
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar
Comments