This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A236366 #16 Sep 22 2022 01:40:23 %S A236366 23456789,3456789,2456789,356789,246789,5789,2689,379,28,349,0,5,3,6, %T A236366 24,37,24,58,0,39,246,0,3,57,4,35,28,36,4,9,25,7,2,4,6,58,6,4,0,379,5, %U A236366 4,6,0,28,45,0,7,6,79,24,35,0,8,46,3,57,0,4,9,6,5,248,7,248 %N A236366 a(n) is the concatenation of the numbers k, 2 <= k <= 9, such that the base-k representation of n is a palindrome; a(n) = 0 if there is no such base. %H A236366 Peter J. C. Moses, <a href="/A236366/b236366.txt">Table of n, a(n) for n = 1..5000</a> %e A236366 Let n = 29. In bases 2, 3, ..., 9 the representations of 29 are 11101_2, 1002_3, 131_4, 104_5, 45_6, 41_7, 35_8, 32_9. In this list only 131_4 is a palindrome, so a(29) = 4. %t A236366 Table[FromDigits[1+Flatten[Position[Map[Reverse[#]==#&,Map[IntegerDigits[n,#]&,Range[2,9]]],True]]],{n,50}] %o A236366 (Python) %o A236366 from sympy.ntheory import digits %o A236366 def c(n, b): d = digits(n, b)[1:]; return d == d[::-1] %o A236366 def a(n): return int("0"+"".join(d for d in "23456789" if c(n, int(d)))) %o A236366 print([a(n) for n in range(1, 66)]) # _Michael S. Branicky_, Sep 21 2022 %Y A236366 Cf. A002113, A235922. %K A236366 nonn,base %O A236366 1,1 %A A236366 _Vladimir Shevelev_, Jan 23 2014 %E A236366 Name clarified by _Jon E. Schoenfield_, Sep 21 2022