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-38 of 38 results.

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.

A029730 Numbers that are palindromic in base 16.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 257, 273, 289, 305, 321, 337, 353, 369, 385, 401, 417, 433, 449, 465, 481, 497, 514, 530, 546, 562, 578, 594, 610, 626, 642
Offset: 1

Views

Author

Keywords

Examples

			0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 11, 22, 33, 44, 55, 66, 77, 88, 99, AA, BB, CC, DD, EE, FF, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191,1A1, 1B1, 1C1, 1D1, 1E1, 1F1, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 2A2, 2B2, 2C2, 2D2, 2E2, 2F2, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 3A3, 3B3, 3C3, 3D3, 3E3, 3F3, 404, ... - _Reinhard Zumkeller_, Sep 23 2015
		

Crossrefs

Cf. A029731 (also palindromic in decimal), A056962, A262437.

Programs

  • Haskell
    a029730 n = a029730_list !! (n-1)
    a029730_list = map (foldr (\h v -> 16 * v + h) 0) $
                       filter (\xs -> xs == reverse xs) a262437_tabf
    -- Reinhard Zumkeller, Sep 23 2015
    
  • Mathematica
    palindromicQ[n_, b_] := Module[{i = IntegerDigits[n, b]}, i == Reverse[i]]; Select[Range[1000], palindromicQ[#, 16] &] (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
  • PARI
    isok(n) = my(v=digits(n,16)); v == Vecrev(v); \\ Michel Marcus, Sep 30 2018
    
  • Python
    def A029730(n):
        if n == 1: return 0
        y = (x:=1<<(n.bit_length()-2&-4))<<4
        return (c:=n-x)*x+int(hex(c)[-2:1:-1]or'0',16) if nChai Wah Wu, Jun 13 2024

Formula

Sum_{n>=2} 1/a(n) = 3.71109616... (Phunphayap and Pongsriiam, 2019). - Amiram Eldar, Oct 17 2020

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
    

A340559 Numbers that are palindromic in base 2 and base 16.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 15, 17, 51, 85, 119, 153, 255, 257, 273, 771, 819, 1285, 1317, 1365, 1397, 1799, 1831, 1879, 1911, 2313, 2409, 2457, 2553, 3855, 3951, 3999, 4095, 4097, 4369, 12291, 13107, 20485, 21029, 21845, 22389, 28679, 29223, 30039, 30583, 36873, 38505
Offset: 1

Views

Author

Glen Gilchrist, Jan 11 2021

Keywords

Crossrefs

Intersection of A006995 and A029730.

Programs

  • Mathematica
    Select[Range[0, 10^5], PalindromeQ @ IntegerDigits[#, 2] && PalindromeQ @ IntegerDigits[#, 16]  &] (* Amiram Eldar, Jan 11 2021 *)
  • PARI
    ispal(m, b) = my(d=digits(m, b)); d == Vecrev(d);
    isok(m) = ispal(m, 2) && ispal(m, 16); \\ Michel Marcus, Jan 20 2021
  • Python
    def palindrome(x):
        res = str(x) == str(x)[::-1]
        return res
    def dec_to_bin(x):
        return int(bin(x)[2:])
    def dec_to_hex(x):
        return (hex(x)[2:])
    for x in range (1,10000):
        if palindrome(dec_to_hex(x)) & palindrome(dec_to_bin(x)) == True:
              print(x)
    (BASIC:- MM Basic, a modern QBASIC variant, https://www.mmbasic.com/)
    Function reverse(in_string$) As string
      Local r$
      Local i
      For i = Len(in_string$) To 1 Step -1
          b$=Mid$(in_string$,i,1)
          r$=r$+b$
      Next i
      reverse=r$
    End Function
    For i = 1 To 10000
      If Bin$(i) = reverse(Bin$(i)) Then
          If Hex$(i) = reverse(Hex$(i)) Then
              Print i,Bin$(i), Hex$(i)
          EndIf
      EndIf
    Next i
    

A046484 Primes that are palindromic in bases 10 and 16.

Original entry on oeis.org

2, 3, 5, 7, 11, 353, 787, 94049, 98689, 190080091, 3405684865043, 397922151229793
Offset: 1

Views

Author

Keywords

Comments

Intersection of A002385 and A029732. - Michel Marcus, Jun 09 2013

Examples

			787_10 = 313_16. - _Jon E. Schoenfield_, Apr 10 2021
		

Crossrefs

Programs

  • PARI
    ispal(v) = {for(i=1, #v\2, if (v[i] != v[#v-i+1], return(0));); return(1);}; lista(nn) = {forprime(p=2, nn, if (ispal(digits(p, 10)) && ispal(digits(p, 16)), print1(p, ", ")););}  \\ Michel Marcus, Jun 09 2013
Previous Showing 31-38 of 38 results.