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 A029804 #43 Sep 08 2022 08:44:50 %S A029804 0,1,2,3,4,5,6,7,9,121,292,333,373,414,585,3663,8778,13131,13331, %T A029804 26462,26662,30103,30303,207702,628826,660066,1496941,1935391,1970791, %U A029804 4198914,55366355,130535031,532898235,719848917,799535997,1820330281 %N A029804 Numbers that are palindromic in bases 8 and 10. %C A029804 Intersection of A002113 and A029803. - _Michel Marcus_, Nov 20 2014 %H A029804 Robert G. Wilson v, <a href="/A029804/b029804.txt">Table of n, a(n) for n = 1..75</a> %H A029804 Patrick De Geest, <a href="http://www.worldofnumbers.com/nobase10.htm">Palindromic numbers beyond base 10</a> %H A029804 Rick Regan, <a href="http://www.exploringbinary.com/finding-numbers-that-are-palindromic-in-multiple-bases/">Code to generate this sequence</a> %t A029804 b1=8; b2=10; lst={}; Do[d1=IntegerDigits[n, b1];d2=IntegerDigits[n,b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 100000}]; lst (* _Vincenzo Librandi_, Nov 13 2014 *) %t A029804 Select[Range[0,1820331000],PalindromeQ[#]&&IntegerDigits[#,8] == Reverse[ IntegerDigits[#,8]]&] (* _Harvey P. Dale_, Mar 18 2019 *) %o A029804 (PARI) isok(n) = (n==0) || ((d10=digits(n, 10)) && (d10==Vecrev(d10)) && (d8=digits(n, 8)) && (d8==Vecrev(d8))); \\ _Michel Marcus_, Nov 13 2014 %o A029804 (PARI) ispal(n,r) = my(d=digits(n,r)); d==Vecrev(d); %o A029804 for(n=0,10^7,if(ispal(n,10)&&ispal(n,8),print1(n,", "))); \\ _Joerg Arndt_, Nov 22 2014 %o A029804 (Magma) [n: n in [0..10000000] | Intseq(n, 10) eq Reverse(Intseq(n, 10))and Intseq(n, 8) eq Reverse(Intseq(n, 8))]; // _Vincenzo Librandi_, Nov 23 2014 %o A029804 (Python) %o A029804 def palQ8(n): # check if n is a palindrome in base 8 %o A029804 s = oct(n)[2:] %o A029804 return s == s[::-1] %o A029804 def palQgen10(l): # unordered generator of palindromes of length <= 2*l %o A029804 if l > 0: %o A029804 yield 0 %o A029804 for x in range(1,10**l): %o A029804 s = str(x) %o A029804 yield int(s+s[-2::-1]) %o A029804 yield int(s+s[::-1]) %o A029804 A029804_list = sorted([n for n in palQgen10(6) if palQ8(n)]) %o A029804 # _Chai Wah Wu_, Nov 25 2014 %Y A029804 Cf. A007632, A007633, A029961, A029962, A029963, A029964, A029965, A029966, A029967, A029968, A029969, A029970, A029731, A097855, A099165. %K A029804 nonn,base %O A029804 1,3 %A A029804 _Patrick De Geest_ %E A029804 More terms from _Robert G. Wilson v_, Sep 30 2004 %E A029804 Incorrect Mathematica program deleted by _N. J. A. Sloane_, Sep 01 2009 %E A029804 Terms 33 through 36 corrected by Rick Regan (exploringbinary(AT)gmail.com), Sep 01 2009