cp's OEIS Frontend

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.

A250412 Palindromic in bases 10 and 36.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1221, 1441, 2882, 5115, 12321, 16861, 19491, 21112, 30803, 33433, 36063, 37973, 42224, 159951, 741147, 987789, 1301031, 1867681, 3315133, 4306034, 5182815, 5927295, 6918196, 6950596, 9242429, 9488849, 10066001, 48655684
Offset: 1

Views

Author

Robert G. Wilson v, Nov 23 2014

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [0..10000000] | Intseq(n, 10) eq Reverse(Intseq(n, 10))and Intseq(n, 36) eq Reverse(Intseq(n, 36))]; // Vincenzo Librandi, Nov 23 2014
  • Mathematica
    palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; genPal[n_] := Block[{id = IntegerDigits@ n, insert = {{}, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}}}, FromDigits@ Join[id, #, Reverse@ id] & /@ insert]; k = 1; lst = {0, 1, 2, 3,  4, 5, 6, 7, 8, 9}; While[k < 1000001, s = Select[ genPal[k], palQ[#, 36] &]; If[s != {}, AppendTo[lst, s]; Print@ s; lst = Sort@ Flatten@ lst]; k++]; lst
    b1=10; b2=36; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 10000000}]; lst (* Vincenzo Librandi, Nov 23 2014 *)
    Select[Range[0,49*10^6],PalindromeQ[#]&&IntegerDigits[#,36]== Reverse[ IntegerDigits[ #,36]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 04 2019 *)