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.

Previous Showing 31-39 of 39 results.

A171775 a(n) = smallest number M such that there exist bases b_2, b_3, ..., b_n with the property that M written in base b_k is a k-digit palindrome for all k=2..n.

Original entry on oeis.org

1, 3, 5, 52, 130, 1885, 1073741824, 4398046511104
Offset: 1

Views

Author

James G. Merickel, Dec 18 2009

Keywords

Comments

a(n) is no more than 2^[(n-1)*(n-2)] for n > 6 (and equals it for n = 7 and 8 at least). The reason for this bound is that for this number for each length from n down to 3 there is at least one power of 2, 2^k, such that in base b = 2^k-1 the binomial expansion of (b+1)^floor([(n-1)*(n-2)]/k) multiplied by the remaining small power of 2 gives a palindromic expression not requiring carries in base b. James G. Merickel, Aug 05 2015

Examples

			a(6)=1885: the bases are 1884 (1885 is 11 in base 1884), 14 (1885 is 989 in base 14), 12 (it is 1111 in base 12), 6 (it is 12421 in base 6), and 4 (it is 131131 in base 4).
		

Crossrefs

Extensions

a(7) and a(8) added by James G. Merickel, Feb 04 2010
Offset changed to 1, with corresponding addition of a(1) by James G. Merickel, Jul 24 2015
Comment corrected and explained.James G. Merickel, Aug 05 2015
Definition and example rewritten by N. J. A. Sloane, Aug 05 2015

A259381 Palindromic numbers in bases 3 and 8 written in base 10.

Original entry on oeis.org

0, 1, 2, 4, 121, 130, 203, 316, 8578, 9490, 17492, 944035, 1141652, 1276916, 1554173, 58961443, 67470916, 4099065139, 5691134677, 81452592329, 81473867465, 419572845958, 21056462595764, 363376288168081
Offset: 1

Views

Author

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

Keywords

Examples

			121 is in the sequence because 121_10 = 171_8 = 11111_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, 8]; If[palQ[pp, 3], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=3; b2=8; 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 A029803.

A259383 Palindromic numbers in bases 5 and 8 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 18, 36, 186, 438, 2268, 2709, 11898, 18076, 151596, 228222, 563786, 5359842, 32285433, 257161401, 551366532, 621319212, 716064597, 2459962002, 5018349804, 5067084204, 7300948726, 42360367356, 139853034114, 176616961826, 469606524278, 669367713609, 1274936571666, 1284108810066, 5809320306961, 8866678870082, 11073162740322, 14952142559323, 325005646077513
Offset: 1

Views

Author

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

Keywords

Examples

			186 is in the sequence because 186_10 = 272_8 = 1221_5.
		

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, 5], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=5; b2=8; 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 A029952 and A029803.

A259387 Palindromic numbers in bases 4 and 9 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 255, 273, 373, 546, 2550, 2730, 2910, 16319, 23205, 54215, 1181729, 1898445, 2576758, 3027758, 3080174, 4210945, 9971750, 163490790, 2299011170, 6852736153, 6899910553, 160142137430, 174913133450, 204283593150, 902465909895, 1014966912315, 2292918574418, 9295288254930, 11356994802010, 11372760382810, 38244097345762
Offset: 1

Views

Author

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

Keywords

Examples

			273 is in the sequence because 273_10 = 333_9 = 10101_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, 9]; If[palQ[pp, 4], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=4; b2=9; 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 A029955.

A259388 Palindromic numbers in bases 5 and 9 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 109, 246, 282, 564, 701, 22386, 32152, 41667, 47653, 48553, 1142597, 1313858, 1412768, 1677684, 12607012902, 19671459008, 20134447808, 24208576998, 24863844904, 26358878059
Offset: 1

Views

Author

Robert G. Wilson v, Jul 16 2015

Keywords

Examples

			246 is in the sequence because 246_10 = 303_9 = 1441_5.
		

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, 9]; If[palQ[pp, 5], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=5; b2=9; 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 A029952 and A029955.

A259389 Palindromic numbers in bases 6 and 9 written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 80, 154, 191, 209, 910, 3740, 5740, 8281, 16562, 16814, 2295481, 2300665, 2350165, 2439445, 2488945, 2494129, 2515513, 7971580, 48307924, 61281793, 69432517, 123427622, 124091822, 124443290, 55854298990, 184314116750, 185794441250, 187195815770, 327925630018, 7264479038060, 27832011695551
Offset: 1

Views

Author

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

Keywords

Examples

			209 is in the sequence because 209_10 = 252_9 = 545_6.
		

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, 9]; If[palQ[pp, 6], AppendTo[lst, pp]; Print[pp]]; k++]; lst
    b1=6; b2=9; lst={}; Do[d1=IntegerDigits[n, b1]; d2=IntegerDigits[n, b2]; If[d1==Reverse[d1]&&d2==Reverse[d2], AppendTo[lst, n]], {n, 0, 1000000}]; lst (* Vincenzo Librandi, Jul 17 2015 *)

Formula

Intersection of A029953 and A029955.

A248889 Palindromic in base 10 and 18.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 171, 323, 343, 505, 595, 686, 848, 1661, 2112, 3773, 23332, 46664, 69996, 262262, 583385, 782287, 859958, 981189, 1254521, 1403041, 1832381, 39388393, 54411445, 55499455, 88844888, 118919811, 191010191
Offset: 1

Views

Author

Mauro Fiorentini, Mar 05 2015

Keywords

Comments

a(54) > 10^12.

Examples

			848 in decimal is 2B2 in base 18, so 848 is in the sequence.
1661 in decimal is 525 in base 18, so 1661 is in the sequence.
1771 in decimal is 587 in base 18, which is not a palindrome, so 1771 is not in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^7] | Intseq(n) eq Reverse(Intseq(n)) and Intseq(n,18) eq Reverse(Intseq(n,18))]; // Vincenzo Librandi, Mar 21 2015
    
  • Maple
    IsPalindromic := proc(n, Base)
        local Conv, i;
        Conv := convert(n, base, Base);
        for i from 1 to nops(Conv) / 2 do
            if Conv [i] <> Conv [nops(Conv) + 1 - i] then
                return false;
            fi:
        od:
        true;
    end proc:
    Base := 18;
    A := [];
    for i from 1 to 10^6 do:
       S := convert(i, base, 10);
       V := 0;
       if i mod 10 = 0 then
          next;
       fi;
       for j from 1 to nops(S) do:
          V := V * 10 + S [j];
       od:
       for j from 0 to 10 do:
          V1 := V * 10^(nops(S) + j) + i;
          if IsPalindromic(V1, Base) then
             A := [op(A), V1];
          fi;
       od:
       V1 := (V - (V mod 10)) * 10^(nops(S) - 1) + i;
       if IsPalindromic(V1, Base) then
          A := [op(A), V1];
       fi;
    od:
    sort(A);
  • Mathematica
    palindromicQ[n_, b_:10] := TrueQ[IntegerDigits[n, b] == Reverse[IntegerDigits[n, b]]]; Select[Range[0, 499], palindromicQ[#] && palindromicQ[#, 18] &] (* Alonso del Arte, Mar 21 2015 *)
  • PARI
    isok(n) = (n==0) || ((d = digits(n, 10)) && (Vecrev(d) == d) && (d = digits(n, 18)) && (Vecrev(d) == d)); \\ Michel Marcus, Mar 14 2015
    
  • Python
    def palgen10(l): # generator of palindromes of length <= 2*l
        if l > 0:
            yield 0
            for x in range(1,l+1):
                n = 10**(x-1)
                n2 = n*10
                for y in range(n,n2):
                    s = str(y)
                    yield int(s+s[-2::-1])
                for y in range(n,n2):
                    s = str(y)
                    yield int(s+s[::-1])
    def palcheck(n, b): # check if n is a palindrome in base b
        s = digits(n, b)
        return s == s[::-1]
    A248889_list = [n for n in palgen10(9) if palcheck(n, 18)]
    # Chai Wah Wu, Mar 23 2015

A248899 Numbers that are palindromic in bases 10 and 19.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 666, 838, 1771, 432234, 864468, 1551551, 1897981, 2211122, 155292551, 330050033, 453848354, 467535764, 650767056, 666909666, 857383758, 863828368, 47069796074, 62558085526, 67269596276, 87161116178, 96060106069, 121791197121, 127673376721, 139103301931, 234595595432, 246025520642
Offset: 1

Views

Author

Mauro Fiorentini, Mar 06 2015

Keywords

Comments

Next term > 10^12.

Examples

			838 = 262 in base 19.
		

Crossrefs

Programs

  • 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
  • Maple
    IsPalindromic := proc(n, Base)   local Conv, i;
       Conv := convert(n, base, Base);
    for i from 1 to nops(Conv) / 2 do:
        if Conv [i] <> Conv [nops(Conv) + 1 - i] then
           return false:
        fi:
    od:
    return true;
    end proc;
    Base := 19;
    A := [];
    for i from 1 to 10^6 do:
       S := convert(i, base, 10);
       V := 0;
       if i mod 10 = 0 then
          next;
       fi;
       for j from 1 to nops(S) do:
          V := V * 10 + S [j];
       od:
       for j from 0 to 10 do:
          V1 := V * 10^(nops(S) + j) + i;
          if IsPalindromic(V1, Base) then
             A := [op(A), V1];
          fi;
       od:
       V1 := (V - (V mod 10)) * 10^(nops(S) - 1) + i;
       if IsPalindromic(V1, Base) then
          A := [op(A), V1];
       fi;
    od:
    sort(A);
  • Mathematica
    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 *)
    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 *)
  • PARI
    isok(n) = (n==0) || ((d = digits(n, 10)) && (Vecrev(d) == d) && (d = digits(n, 19)) && (Vecrev(d) == d)); \\ Michel Marcus, Mar 07 2015
    

A046481 Primes that are palindromic in bases 10 and 13.

Original entry on oeis.org

2, 3, 5, 7, 11, 313, 353, 797
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1998

Keywords

Examples

			313_10 = 1b1_13, where b represents eleven as a single digit.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[150]],PalindromeQ[#]&&IntegerDigits[#,13]==Reverse[IntegerDigits[#,13]]&] (* Harvey P. Dale, Apr 15 2025 *)
Previous Showing 31-39 of 39 results.