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 A248899 #25 Sep 08 2022 08:46:10 %S A248899 0,1,2,3,4,5,6,7,8,9,11,666,838,1771,432234,864468,1551551,1897981, %T A248899 2211122,155292551,330050033,453848354,467535764,650767056,666909666, %U A248899 857383758,863828368,47069796074,62558085526,67269596276,87161116178,96060106069,121791197121,127673376721,139103301931,234595595432,246025520642 %N A248899 Numbers that are palindromic in bases 10 and 19. %C A248899 Next term > 10^12. %e A248899 838 = 262 in base 19. %p A248899 IsPalindromic := proc(n, Base) local Conv, i; %p A248899 Conv := convert(n, base, Base); %p A248899 for i from 1 to nops(Conv) / 2 do: %p A248899 if Conv [i] <> Conv [nops(Conv) + 1 - i] then %p A248899 return false: %p A248899 fi: %p A248899 od: %p A248899 return true; %p A248899 end proc; %p A248899 Base := 19; %p A248899 A := []; %p A248899 for i from 1 to 10^6 do: %p A248899 S := convert(i, base, 10); %p A248899 V := 0; %p A248899 if i mod 10 = 0 then %p A248899 next; %p A248899 fi; %p A248899 for j from 1 to nops(S) do: %p A248899 V := V * 10 + S [j]; %p A248899 od: %p A248899 for j from 0 to 10 do: %p A248899 V1 := V * 10^(nops(S) + j) + i; %p A248899 if IsPalindromic(V1, Base) then %p A248899 A := [op(A), V1]; %p A248899 fi; %p A248899 od: %p A248899 V1 := (V - (V mod 10)) * 10^(nops(S) - 1) + i; %p A248899 if IsPalindromic(V1, Base) then %p A248899 A := [op(A), V1]; %p A248899 fi; %p A248899 od: %p A248899 sort(A); %t A248899 palQ[n_, b_] := Block[{d = IntegerDigits[n, b]}, If[d == Reverse@ d, True, False]]; Select[Range[0, 10^6], And[palQ[#, 10], palQ[#, 19]] &] (* _Michael De Vlieger_, Mar 07 2015 *) %t A248899 b1=10; b2=19; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 10^7}]; lst (* _Vincenzo Librandi_, Mar 08 2015 *) %o A248899 (PARI) isok(n) = (n==0) || ((d = digits(n, 10)) && (Vecrev(d) == d) && (d = digits(n, 19)) && (Vecrev(d) == d)); \\ _Michel Marcus_, Mar 07 2015 %o A248899 (Magma) [n: n in [0..2*10^7] | Intseq(n) eq Reverse(Intseq(n))and Intseq(n, 19) eq Reverse(Intseq(n, 19))]; // _Vincenzo Librandi_, Mar 08 2015 %Y A248899 Cf. A007632, A007633, A029961, A029962, A029963, A029964, A029965, A029966, A029967, A029968, A029969, A029970, A029731, A097855, A248889. %K A248899 base,nonn %O A248899 1,3 %A A248899 _Mauro Fiorentini_, Mar 06 2015