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

A029956 Numbers that are palindromic in base 11.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 122, 133, 144, 155, 166, 177, 188, 199, 210, 221, 232, 244, 255, 266, 277, 288, 299, 310, 321, 332, 343, 354, 366, 377, 388, 399, 410, 421, 432, 443, 454, 465, 476, 488, 499
Offset: 1

Views

Author

Keywords

Comments

Cilleruelo, Luca, & Baxter prove that this sequence is an additive basis of order (exactly) 3. - Charles R Greathouse IV, May 04 2020

Crossrefs

Cf. A002113 (base 10), A029957 (base 12).

Programs

  • Mathematica
    f[n_,b_]:=Module[{i=IntegerDigits[n,b]},i==Reverse[i]];lst={};Do[If[f[n,11],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
    pal11Q[n_]:=Module[{idn11=IntegerDigits[n,11]},idn11==Reverse[idn11]]; Select[Range[0,500],pal11Q] (* Harvey P. Dale, May 11 2015 *)
    Select[Range[0, 500], PalindromeQ[IntegerDigits[#, 11]] &] (* Michael De Vlieger, May 12 2017, Version 10.3 *)
  • PARI
    ispal(n,b)=my(tmp,d=log(n+.5)\log(b)-1);while(d,tmp=n%b;n\=b;if(n\b^d!=tmp,return(0));n=n%(b^d);d-=2;);d<0||n%(b+1)==0
    is(n)=ispal(n,11) \\ Charles R Greathouse IV, Aug 21 2012
    
  • PARI
    ispal(n,b=11)=my(d=digits(n,b)); d==Vecrev(d) \\ Charles R Greathouse IV, May 04 2020
    
  • Python
    from gmpy2 import digits
    from sympy import integer_log
    def A029956(n):
        if n == 1: return 0
        y = 11*(x:=11**integer_log(n>>1,11)[0])
        return int((c:=n-x)*x+int(digits(c,11)[-2::-1]or'0',11) if nChai Wah Wu, Jun 14 2024
  • Sage
    [n for n in (0..499) if Word(n.digits(11)).is_palindrome()] # Peter Luschny, Sep 13 2018
    

Formula

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

A029958 Numbers that are palindromic in base 13.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 170, 183, 196, 209, 222, 235, 248, 261, 274, 287, 300, 313, 326, 340, 353, 366, 379, 392, 405, 418, 431, 444, 457, 470, 483, 496, 510, 523, 536, 549, 562
Offset: 1

Views

Author

Keywords

Comments

Cilleruelo, Luca, & Baxter prove that this sequence is an additive basis of order (exactly) 3. - Charles R Greathouse IV, May 04 2020

Crossrefs

Palindromes in bases 2 through 12: A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955, A002113, A029956, A029957.

Programs

  • Mathematica
    f[n_,b_]:=Module[{i=IntegerDigits[n,b]},i==Reverse[i]];lst={};Do[If[f[n,13],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
    Select[Range[0,600],IntegerDigits[#,13]==Reverse[IntegerDigits[#,13]]&] (* Harvey P. Dale, Nov 16 2022 *)
  • PARI
    isok(n) = my(d=digits(n, 13)); d == Vecrev(d); \\ Michel Marcus, May 13 2017
    
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A029958(n):
        if n == 1: return 0
        y = 13*(x:=13**integer_log(n>>1,13)[0])
        return int((c:=n-x)*x+int(digits(c,13)[-2::-1]or'0',13) if nChai Wah Wu, Jun 14 2024

Formula

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

A029959 Numbers that are palindromic in base 14.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 197, 211, 225, 239, 253, 267, 281, 295, 309, 323, 337, 351, 365, 379, 394, 408, 422, 436, 450, 464, 478, 492, 506, 520, 534, 548, 562, 576, 591
Offset: 1

Views

Author

Keywords

Comments

Cilleruelo, Luca, & Baxter prove that this sequence is an additive basis of order (exactly) 3. - Charles R Greathouse IV, May 04 2020

Examples

			195 is DD in base 14.
196 is 100 in base 14, so it's not in the sequence.
197 is 101 in base 14.
		

Crossrefs

Palindromes in bases 2 through 13: A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955, A002113, A029956, A029957, A029958.

Programs

  • Mathematica
    palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[ Range[0, 600], palQ[#, 14] &] (* Harvey P. Dale, Aug 03 2014 *)
  • PARI
    isok(n) = Pol(d=digits(n, 14)) == Polrev(d); \\ Michel Marcus, Mar 12 2017
    
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A029959(n):
        if n == 1: return 0
        y = 14*(x:=14**integer_log(n>>1,14)[0])
        return int((c:=n-x)*x+int(digits(c,14)[-2::-1]or'0',14) if nChai Wah Wu, Jun 14 2024

Formula

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

A029960 Numbers that are palindromic in base 15.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 226, 241, 256, 271, 286, 301, 316, 331, 346, 361, 376, 391, 406, 421, 436, 452, 467, 482, 497, 512, 527, 542, 557, 572, 587, 602, 617
Offset: 1

Views

Author

Keywords

Comments

Cilleruelo, Luca, & Baxter prove that this sequence is an additive basis of order (exactly) 3. - Charles R Greathouse IV, May 04 2020

Crossrefs

Programs

  • Mathematica
    f[n_,b_]:=Module[{i=IntegerDigits[n,b]},i==Reverse[i]];lst={};Do[If[f[n,15],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 08 2009 *)
    Select[Range@ 620, PalindromeQ@ IntegerDigits[#, 15] &] (* Michael De Vlieger, May 13 2017, Version 10.3 *)
  • PARI
    isok(n) = my(d=digits(n, 15)); d == Vecrev(d); \\ Michel Marcus, May 14 2017
    
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A029960(n):
        if n == 1: return 0
        y = 15*(x:=15**integer_log(n>>1,15)[0])
        return int((c:=n-x)*x+int(digits(c,15)[-2::-1]or'0',15) if nChai Wah Wu, Jun 14 2024

Formula

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

A262065 Numbers that are palindromes in base-60 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 122, 183, 244, 305, 366
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 10 2015

Keywords

Examples

			.      n | a(n) |  base 60          n |  a(n) |  base 60
.   -----+------+-----------    ------+-------+--------------
.    100 | 2440 | [40, 40]       1000 | 56415 | [15, 40, 15]
.    101 | 2501 | [41, 41]       1001 | 56475 | [15, 41, 15]
.    102 | 2562 | [42, 42]       1002 | 56535 | [15, 42, 15]
.    103 | 2623 | [43, 43]       1003 | 56595 | [15, 43, 15]
.    104 | 2684 | [44, 44]       1004 | 56655 | [15, 44, 15]
.    105 | 2745 | [45, 45]       1005 | 56715 | [15, 45, 15]
.    106 | 2806 | [46, 46]       1006 | 56775 | [15, 46, 15]
.    107 | 2867 | [47, 47]       1007 | 56835 | [15, 47, 15]
.    108 | 2928 | [48, 48]       1008 | 56895 | [15, 48, 15]
.    109 | 2989 | [49, 49]       1009 | 56955 | [15, 49, 15]
.    110 | 3050 | [50, 50]       1010 | 57015 | [15, 50, 15]
.    111 | 3111 | [51, 51]       1011 | 57075 | [15, 51, 15]
.    112 | 3172 | [52, 52]       1012 | 57135 | [15, 52, 15]
.    113 | 3233 | [53, 53]       1013 | 57195 | [15, 53, 15]
.    114 | 3294 | [54, 54]       1014 | 57255 | [15, 54, 15]
.    115 | 3355 | [55, 55]       1015 | 57315 | [15, 55, 15]
.    116 | 3416 | [56, 56]       1016 | 57375 | [15, 56, 15]
.    117 | 3477 | [57, 57]       1017 | 57435 | [15, 57, 15]
.    118 | 3538 | [58, 58]       1018 | 57495 | [15, 58, 15]
.    119 | 3599 | [59, 59]       1019 | 57555 | [15, 59, 15]
.    120 | 3601 | [1, 0, 1]      1020 | 57616 | [16, 0, 16]
.    121 | 3661 | [1, 1, 1]      1021 | 57676 | [16, 1, 16]
.    122 | 3721 | [1, 2, 1]      1022 | 57736 | [16, 2, 16]
.    123 | 3781 | [1, 3, 1]      1023 | 57796 | [16, 3, 16]
.    124 | 3841 | [1, 4, 1]      1024 | 57856 | [16, 4, 16]
.    125 | 3901 | [1, 5, 1]      1025 | 57916 | [16, 5, 16]  .
		

Crossrefs

Cf. A262079 (first differences).
Intersection with A002113: A262069.
Corresponding sequences for bases 2 through 12: A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955, A002113, A029956, A029957.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a262065 n = a262065_list !! (n-1)
    a262065_list = union us vs where
       us = [val60 $ bs ++ reverse bs | bs <- bss]
       vs = [0..59] ++ [val60 $ bs ++ cs ++ reverse bs |
              bs <- tail bss, cs <- take 60 bss]
       bss = iterate s [0] where
             s [] = [1]; s (59:ds) = 0 : s ds; s (d:ds) = (d + 1) : ds
       val60 = foldr (\b v -> 60 * v + b) 0
    
  • Magma
    [n: n in [0..600] | Intseq(n, 60) eq Reverse(Intseq(n, 60))]; // Vincenzo Librandi, Aug 24 2016
    
  • Mathematica
    f[n_, b_]:=Module[{i=IntegerDigits[n, b]}, i==Reverse[i]]; lst={}; Do[If[f[n, 60], AppendTo[lst, n]], {n, 400}]; lst (* Vincenzo Librandi, Aug 24 2016 *)
    pal60Q[n_]:=Module[{idn60=IntegerDigits[n,60]},idn60==Reverse[idn60]]; Select[Range[0,400],pal60Q] (* Harvey P. Dale, Nov 04 2017 *)
  • PARI
    isok(m) = my(d=digits(m, 60)); d == Vecrev(d); \\ Michel Marcus, Jan 22 2022
    
  • Python
    from sympy import integer_log
    from gmpy2 import digits, mpz
    def A262065(n):
        if n == 1: return 0
        y = 60*(x:=60**integer_log(n>>1,60)[0])
        return int((c:=n-x)*x+mpz(digits(c,60)[-2::-1]or'0',60) if nChai Wah Wu, Jun 13-14 2024

A297277 Numbers whose base-12 digits have equal down-variation and up-variation; see Comments.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 145, 157, 169, 181, 193, 205, 217, 229, 241, 253, 265, 277, 290, 302, 314, 326, 338, 350, 362, 374, 386, 398, 410, 422, 435, 447, 459, 471, 483, 495, 507, 519, 531, 543, 555
Offset: 1

Views

Author

Clark Kimberling, Jan 16 2018

Keywords

Comments

Suppose that n has base-b digits b(m), b(m-1), ..., b(0). The base-b down-variation of n is the sum DV(n,b) of all d(i)-d(i-1) for which d(i) > d(i-1); the base-b up-variation of n is the sum UV(n,b) of all d(k-1)-d(k) for which d(k) < d(k-1). The total base-b variation of n is the sum TV(n,b) = DV(n,b) + UV(n,b). See the guide at A297330.
Differs first from A029957 after the zero for 1741 = 1011_12, which is not a palindrome in base 12 but has DV(1741,12) = UV(1741,12) =1. - R. J. Mathar, Jan 23 2018

Examples

			555 in base-12:  3,10,3, having DV = 7, UV = 7, so that 555 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]];
    x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &];
    b = 12; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}];
    w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]];
    Take[Flatten[Position[w, -1]], 120]   (* A297276 *)
    Take[Flatten[Position[w, 0]], 120]    (* A297277 *)
    Take[Flatten[Position[w, 1]], 120]    (* A297278 *)

A046246 Cubes which are palindromes in base 12.

Original entry on oeis.org

0, 1, 8, 2197, 3048625, 3869893, 5168743489, 8917390455553, 9104453457841, 11355729445333, 15407207327425537, 15757560619152625, 19591506830849941, 26623360029195546625, 26669607878348076097, 33849634498353904789
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Intersection of A029957 and A000578.
Cf. A046245.

Formula

a(n) = A046245(n)^3. - Andrew Howroyd, Aug 11 2024

Extensions

Offset corrected by Andrew Howroyd, Aug 11 2024

A253241 The "Reverse and Add!" problem in base 12: sequence lists the final palindrome number for n, or -1 if no palindrome is ever reached. (Written in base 10.)

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 13, 39, 65, 91, 117, 143, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 169, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 169, 169, 39, 52, 65, 78, 91, 104, 117, 130, 143, 169, 169, 507, 52, 65, 78, 91, 104, 117, 130, 143, 169, 169, 507, 676, 65, 78, 91, 104, 117
Offset: 0

Views

Author

Eric Chen, Apr 07 2015

Keywords

Comments

Is a(n) = -1 possible? All numbers below 100 (decimal 144) reach a palindrome.
a(237) is conjectured to be -1.
A060382 lists the smallest possible Lychrel number in base n.

Examples

			a(29) = 91 since (in duodecimal) 25 (decimal 29) + 52 = 77 (decimal 91) and 77 is a palindrome.
a(69) = 507 since (in duodecimal) 59 (decimal 69) + 95 = 132, 132 + 231 = 363 (decimal 507) and 363 is a palindrome.
a(105) = 1885 since (in duodecimal) 89 (decimal 105) + 98 = 165, 165 + 561 = 706, 706 + 607 = 1111 (decimal 1885) and 1111 is a palindrome.
		

Crossrefs

Programs

  • Mathematica
    tol = 1728; r[n_] := FromDigits[Reverse[IntegerDigits[n, 12]], 12]; palQ[n_] := n == r[n]; ar[n_] := n + r[n]; Table[k = 0; If[palQ[n], n = ar[n]; k = 1]; While[! palQ[n] && k < tol, n = ar[n]; k++]; If[k == tol, n = -1]; n, {n, 0, 144}]

A043271 Sum of the digits of the n-th base 12 palindrome.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10
Offset: 1

Views

Author

Keywords

Crossrefs

A029957 (base 12 palindromes)
Showing 1-9 of 9 results.