login
Numbers whose cube is palindromic in base 4.
2

%I #32 Aug 02 2022 09:21:07

%S 0,1,5,17,65,257,1025,4097,16385,65537,262145,1048577,4194305,

%T 16777217,67108865,268435457,1073741825,4294967297

%N Numbers whose cube is palindromic in base 4.

%C No number less than 10^8 has a cube that is palindromic in base 2 or base 3.

%C Next term exceeds 10000000000. - Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 09 2006

%H Patrick De Geest, <a href="http://www.worldofnumbers.com/index.html">World!Of Numbers</a>

%F It seems that for n>=2, a(n)=4^(n-1)+1. - _Benoit Cloitre_, Dec 07 2003

%t For[i = 1, i < 1000000, i++, tmp = IntegerDigits[i^3, 4]; If[tmp == Reverse[tmp], Print[i]] ]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 09 2006 *)

%o (PARI) isok(k) = my(d=digits(k^3,4)); Vecrev(d) == d; \\ _Michel Marcus_, Aug 02 2022

%o (Python)

%o from itertools import count, islice

%o from sympy.ntheory import is_palindromic as ispal

%o def agen(startk=0): yield from (k for k in count(startk) if ispal(k**3, 4))

%o print(list(islice(agen(), 12))) # _Michael S. Branicky_, Aug 02 2022

%Y Cf. A046232.

%Y Cf. A052539. - _R. J. Mathar_, Oct 13 2008

%K nonn,more,base

%O 1,3

%A _Patrick De Geest_, May 15 1998

%E More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 09 2006, corrected Nov 01 2006