%I #11 Sep 19 2022 02:03:57
%S 1,2,4,8,6,3,6,8,6,5,4,8,9,9,8,8,55,131,262,242,8,9,9,838,777,55,88,
%T 77,545,9,737,474,949,858,717,383,767,9,77,888,777,255552,111,222,444,
%U 888,77,3553,767,21312,42624,99,737,474,9,797,575,8558,7117,646,606,939
%N Largest palindromic substring in 2^n.
%H Michael S. Branicky, <a href="/A046260/b046260.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = A047813(A000079(n)). - _Michel Marcus_, Sep 19 2022
%e 2^41 = 2199023{255552}.
%o (Python)
%o def c(s): return s[0] != "0" and s == s[::-1]
%o def a(n):
%o s = str(2**n)
%o ss = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1))
%o return max(int(w) for w in ss if c(w))
%o print([a(n) for n in range(62)]) # _Michael S. Branicky_, Sep 18 2022
%Y Cf. A000079, A047813, A046268.
%K nonn,base,easy
%O 0,2
%A _Patrick De Geest_, Jun 15 1998
|