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 26 results. Next

A060792 Numbers that are palindromic in bases 2 and 3.

Original entry on oeis.org

0, 1, 6643, 1422773, 5415589, 90396755477, 381920985378904469, 1922624336133018996235, 2004595370006815987563563, 8022581057533823761829436662099, 392629621582222667733213907054116073, 32456836304775204439912231201966254787, 428027336071597254024922793107218595973
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

a(18) (if it exists) is greater than 3^93. - Ilya Nikulshin, Feb 22 2016

Examples

			6643 is a term: since 6643 = 1100111110011_2 = 100010001_3.
1422773 is a term: 1422773 = 101011011010110110101_2 = 2200021200022_3. - _Vladimir Joseph Stephan Orlovsky_, Sep 19 2009
		

Crossrefs

a(3) = A048268(2) = A056749(3).
Intersection of A006995 and A014190.

Programs

  • Magma
    [n: n in [0..2*10^7] | Intseq(n, 3) eq Reverse(Intseq(n, 3))and Intseq(n, 2) eq Reverse(Intseq(n, 2))]; // Vincenzo Librandi, Feb 24 2016
  • Mathematica
    pal2Q[n_Integer] := IntegerDigits[n, 2] == Reverse[IntegerDigits[n, 2]]; pal3Q[n_Integer] := IntegerDigits[n, 3] == Reverse[IntegerDigits[n, 3]]; A060792 = {}; Do[If[pal2Q[n] && pal3Q[n], AppendTo[A060792, n]], {n, 12!}]; A060792 (* Vladimir Joseph Stephan Orlovsky, Sep 19 2009 *)
    b1=2; b2=3; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 2 10^7}]; lst (* Vincenzo Librandi, Feb 24 2016 *)
  • PARI
    ispal(n,b)=my(d=digits(n,b)); d==Vecrev(d)
    is(n)=ispal(n,2)&&ispal(n,3) \\ Charles R Greathouse IV, Jun 17 2014
    
  • Python
    from itertools import chain
    from gmpy2 import digits, mpz
    A060792 = [int(n,2) for n in chain(map(lambda x:bin(x)[2:]+bin(x)[2:][::-1],range(1,2**16)),map(lambda x:bin(x)[2:]+bin(x)[2:][-2::-1], range(1,2**16))) if mpz(int(n,2)).digits(3) == mpz(int(n,2)).digits(3)[::-1]] # Chai Wah Wu, Aug 12 2014
    

Extensions

a(7) found by François Boisson, using a Caml program running on an AMD-64 machine. - Bruno Petazzoni, program co-author, Jan 31 2006
a(8) from the same source, May 26 2006
a(9) from Alan Grimes, Dec 16 2013
a(10) from Keith F. Lynch, Jan 07 2014
Term 0 prepended by Robert G. Wilson v, Oct 08 2014
a(11)-a(15) (from Alan Grimes and Keith F. Lynch) added by Japheth Lim, Jan 30 2014

A099145 Numbers in base 10 that are palindromic in bases 7 and 8.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 121, 178, 235, 292, 300, 2997, 6953, 7801, 10658, 13459, 16708, 428585, 431721, 444713, 447849, 450985, 502457, 626778, 786435, 10453500, 27924649
Offset: 1

Views

Author

Robert G. Wilson v, Sep 30 2004

Keywords

Comments

Intersection of A029954 and A029803. - Michel Marcus, Oct 09 2014

Examples

			178 is in the sequence because 178_10 = 343_7 = 262_8.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_Integer, base_Integer] := Block[{idn = IntegerDigits[n, base]}, idn == Reverse[ idn]]; Select[ Range[ 150000000], palQ[ #, 7] && palQ[ #, 8] &]

A099146 Numbers in base 10 that are palindromic in bases 8 and 9.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 154, 227, 300, 373, 446, 455, 11314, 12547, 17876, 27310, 889435, 894619, 899803, 926371, 1257716, 1262900, 1268084, 1273268, 1294652, 1368461, 1373645, 1405397, 2067519, 63367795, 71877268, 98383349
Offset: 1

Views

Author

Robert G. Wilson v, Sep 30 2004

Keywords

Comments

Intersection of A029803 and A029955. - Michel Marcus, Oct 09 2014

Examples

			227 is in the sequence because 227_10 = 343_8 = 272_9.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_Integer, base_Integer] := Block[{idn = IntegerDigits[n, base]}, idn == Reverse[ idn]]; Select[ Range[ 250000000], palQ[ #, 8] && palQ[ #, 9] &]

Extensions

Term 0 prepended by Robert G. Wilson v, Oct 08 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.

A259382 Palindromic numbers in bases 4 and 8 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 63, 65, 105, 130, 170, 195, 235, 325, 341, 357, 373, 4095, 4097, 4161, 4225, 4289, 6697, 6761, 6825, 6889, 8194, 8258, 8322, 8386, 10794, 10858, 10922, 10986, 12291, 12355, 12419, 12483, 14891, 14955, 15019, 15083, 20485, 20805, 21525, 21845
Offset: 1

Views

Author

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

Keywords

Examples

			235 is in the sequence because 235_10 = 353_8 = 3223_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, 8]; If[palQ[pp, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=4; 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 A014192 and A029803.

Extensions

Corrected and extended by Giovanni Resta, Jul 16 2015
Showing 1-10 of 26 results. Next