OFFSET
1,3
COMMENTS
The only powers of 2 in this sequence are 1 and 2. - Alonso del Arte, Feb 25 2017
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..100
Patrick De Geest, Palindromic numbers beyond base 10
EXAMPLE
3 is in the sequence because 3^2 = 9 = 11 in base 8, which is a palindrome.
4 is not in the sequence because 4^2 = 16 = 20 in base 8, which is not a palindrome.
MATHEMATICA
palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[Range[0, 16000], palQ[#^2, 8] &] (* Harvey P. Dale, May 19 2012 *)
PROG
(Python)
from itertools import count, islice
def A029805_gen(): # generator of terms
return filter(lambda k: (s:=oct(k**2)[2:])[:(t:=(len(s)+1)//2)]==s[:-t-1:-1], count(0))
CROSSREFS
Numbers k such that k^2 is palindromic in base b: A003166 (b=2), A029984 (b=3), A029986 (b=4), A029988 (b=5), A029990 (b=6), A029992 (b=7), this sequence (b=8), A029994 (b=9), A002778 (b=10), A029996 (b=11), A029737 (b=12), A029998 (b=13), A030072 (b=14), A030073 (b=15), A029733 (b=16), A118651 (b=17).
KEYWORD
nonn,base
AUTHOR
STATUS
approved