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.

Showing 1-10 of 20 results. Next

A250411 Palindromic in bases 10 and 27.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 252, 616, 757, 838, 919, 10301, 13031, 15951, 17871, 65856, 1197911, 2287822, 4385834, 5475745, 5549455, 6278726, 6639366, 7368637, 7573757, 8663668, 8737378, 9392939, 9466649, 9827289, 67166176, 214171412, 609808906, 836040638, 2132882312, 2487997842
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, 27) eq Reverse(Intseq(n, 27))]; // 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[#, 27] &]; 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 *)

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 *)

A250409 Palindromic in bases 10 and 24.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 525, 575, 2332, 4664, 6226, 6996, 8558, 10001, 11011, 12621, 13631, 374473, 1851581, 2207022, 2267622, 2762672, 3118113, 3673763, 4029204, 4296924, 4925294, 5103015, 5836385, 6014106, 6281826, 6747476, 7132317, 7192917, 7658567, 7865687
Offset: 1

Views

Author

Robert G. Wilson v, Nov 22 2014

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [0..10000000] | Intseq(n, 10) eq Reverse(Intseq(n, 10))and Intseq(n, 24) eq Reverse(Intseq(n, 24))]; // 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[#, 24] &]; If[s != {}, AppendTo[lst, s]; Print@ s; lst = Sort@ Flatten@ lst]; k++]; lst
    b1=10; b2=24; 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,79*10^5],PalindromeQ[#]&&IntegerDigits[#,24]== Reverse[ IntegerDigits[ #,24]]&] (* Harvey P. Dale, Mar 17 2023 *)

A250410 Numbers palindromic in bases 10 and 25.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 494, 626, 676, 1001, 6886, 7887, 8338, 9339, 622226, 626626, 2828282, 2859582, 3304033, 3309033, 3330333, 3335333, 3361633, 3366633, 3392933, 3397933, 6603066, 6608066, 6634366, 6639366, 8986898, 9400049, 9405049, 9431349, 9436349, 9462649, 9467649, 9493949, 9498949
Offset: 1

Views

Author

Robert G. Wilson v, Nov 22 2014

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [0..10000000] | Intseq(n) eq Reverse(Intseq(n))and Intseq(n, 25) eq Reverse(Intseq(n, 25))]; // 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[#, 25] &]; If[s != {}, AppendTo[lst, s]; Print@ s; lst = Sort@ Flatten@ lst]; k++]; lst
  • Python
    from gmpy2 import digits
    def palQ(n,b): # check if n is a palindrome in base b
        s = digits(n,b)
        return s == s[::-1]
    def palQgen10(l): # unordered generator of palindromes of length <= 2*l
        if l > 0:
            yield 0
            for x in range(1,10**l):
                s = str(x)
                yield int(s+s[-2::-1])
                yield int(s+s[::-1])
    A250410_list = sorted([n for n in palQgen10(6) if palQ(n,25)])
    # Chai Wah Wu, Nov 25 2014

A259380 Palindromic numbers in bases 2 and 8 written in base 10.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 27, 45, 63, 65, 73, 195, 219, 325, 341, 365, 381, 455, 471, 495, 511, 513, 585, 1539, 1755, 2565, 2709, 2925, 3069, 3591, 3735, 3951, 4095, 4097, 4161, 4617, 4681, 12291, 12483, 13851, 14043, 20485, 20613, 20805, 20933, 21525, 21653, 21845, 21973, 23085, 23213, 23405, 23533, 24125, 24253, 24445, 24573, 28679, 28807, 28999, 29127, 29719, 29847
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			2709 is in the sequence because 2709_10 = 5225_8 = 101010010101_2.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 8]; If[palQ[pp, 2], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=2; b2=8; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 30000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)

Formula

Intersection of A006995 and A029803.

A259374 Palindromic numbers in bases 3 and 5 written in base 10.

Original entry on oeis.org

0, 1, 2, 4, 26, 52, 1066, 1667, 2188, 32152, 67834, 423176, 437576, 14752936, 26513692, 27711772, 33274388, 320785556, 1065805109, 9012701786, 9256436186, 12814126552, 18814619428, 201241053056, 478999841578, 670919564984, 18432110906024, 158312796835916, 278737550525722
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 14 2015

Keywords

Comments

0 is only 0 regardless of the base,
1 is only 1 regardless of the base,
2 on the other hand is also 10 in base 2, denoted as 10_2,
3 is 3 in all bases greater than 3, but is 11_2 and 10_3.

Examples

			52 is in the sequence because 52_10 = 202_5 = 1221_3.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 5]; If[ palQ[pp, 3], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=3; b2=5; 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, Jul 15 2015 *)
  • Python
    def nextpal(n,b): # returns the palindromic successor of n in base b
        m, pl = n+1, 0
        while m > 0:
            m, pl = m//b, pl+1
        if n+1 == b**pl:
            pl = pl+1
        n = (n//(b**(pl//2))+1)//(b**(pl%2))
        m = n
        while n > 0:
            m, n = m*b+n%b, n//b
        return m
    n, a3, a5 = 0, 0, 0
    while n <= 20000:
        if a3 < a5:
            a3 = nextpal(a3,3)
        elif a5 < a3:
            a5 = nextpal(a5,5)
        else: # a3 == a5
            print(n,a3)
            a3, a5, n = nextpal(a3,3), nextpal(a5,5), n+1
    # A.H.M. Smeets, Jun 03 2019

Formula

Intersection of A014190 and A029952.

A259375 Palindromic numbers in bases 3 and 6 written in base 10.

Original entry on oeis.org

0, 1, 2, 4, 28, 80, 160, 203, 560, 644, 910, 34216, 34972, 74647, 87763, 122420, 221068, 225064, 6731644, 6877120, 6927700, 7723642, 8128762, 8271430, 77894071, 78526951, 539212009, 28476193256, 200267707484, 200316968444, 201509576804, 201669082004, 231852949304, 232018753064, 232039258376, 333349186006, 2947903946317, 5816975658914, 5817003372578, 11610051837124, 27950430282103, 81041908142188
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 14 2015

Keywords

Comments

Agrees with the number of minimal dominating sets of the halved cube graph Q_n/2 for at least n=1 to 5. - Eric W. Weisstein, Sep 06 2021

Examples

			28 is in the sequence because 28_10 = 44_6 = 1001_3.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 6]; If[palQ[pp, 3], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=3; b2=6; 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, Jul 15 2015 *)

Formula

Intersection of A014190 and A029953.

A259376 Palindromic numbers in bases 4 and 6 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 21, 55, 215, 819, 1885, 7373, 7517, 12691, 14539, 69313, 196606, 1856845, 3314083, 5494725, 33348861, 223892055, 231755895, 322509617, 3614009815, 4036503055, 4165108015, 9233901154, 9330794722, 12982275395, 107074105033, 186398221946, 270747359295, 401478741365, 1809863435625, 2281658774290, 11931403417210, 12761538567790, 12887266632430, 15822654274715, 30255762326713, 46164680151002, 323292550693473, 329536806222753
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 15 2015

Keywords

Examples

			55 is in the sequence because 55_10 = 131_6 = 313_4.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 6]; If[palQ[pp, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst

Formula

Intersection of A014190 and A029953.

A259377 Palindromic numbers in bases 3 and 7 written in base 10.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 40, 100, 121, 142, 164, 242, 328, 400, 1312, 8200, 9103, 14762, 54008, 76024, 108016, 112048, 233920, 532900, 639721, 741586, 2585488, 3316520, 11502842, 24919360, 35664908, 87001616, 184827640, 4346524576, 5642510512, 11641189600, 65304259157, 68095147754, 469837033600, 830172165614, 17136683996456, 21772277941544, 22666883572232, 45221839119556
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			142 is in the sequence because 142_10 = 262_7 = 12021_3.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 7]; If[palQ[pp, 3], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=3; b2=7; 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, Jul 17 2015 *)

Formula

Intersection of A014190 and A029954.

A259378 Palindromic numbers in bases 4 and 7 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 85, 150, 235, 257, 8802, 9958, 13655, 14811, 189806, 428585, 786435, 9262450, 31946605, 34179458, 387973685, 424623193, 430421657, 640680742, 742494286, 1692399385, 22182595205, 30592589645, 1103782149121, 1134972961921, 1871644872505, 2047644601565, 3205015384750, 3304611554563, 3628335729863, 4467627704385
Offset: 1

Views

Author

Eric A. Schmidt and Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			85 is in the sequence because 85_10 = 151_7 = 1111_4.
		

Crossrefs

Programs

  • Mathematica
    (* first load nthPalindromeBase from A002113 *) palQ[n_Integer, base_Integer] := Block[{}, Reverse[ idn = IntegerDigits[n, base]] == idn]; k = 0; lst = {}; While[k < 21000000, pp = nthPalindromeBase[k, 7]; If[palQ[pp, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=4; b2=7; 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, Jul 17 2015 *)

Formula

Intersection of A014192 and A029954.
Showing 1-10 of 20 results. Next