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 21-30 of 33 results. Next

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

A342725 Numbers that are palindromic in base i-1.

Original entry on oeis.org

0, 1, 13, 17, 189, 205, 257, 273, 3005, 3069, 3277, 3341, 4033, 4097, 4305, 4369, 48061, 48317, 49149, 49405, 52173, 52429, 53261, 53517, 64449, 64705, 65537, 65793, 68561, 68817, 69649, 69905, 768957, 769981, 773309, 774333, 785405, 786429, 789757, 790781, 834509
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2021

Keywords

Crossrefs

Similar sequences: A002113 (decimal), A006995 (binary), A014190 (base 3), A014192 (base 4), A029952 (base 5), A029953 (base 6), A029954 (base 7), A029803 (base 8), A029955 (base 9), A046807 (factorial base), A094202 (Zeckendorf), A331191 (dual Zeckendorf), A331891 (negabinary), A333423 (primorial base).

Programs

  • Mathematica
    v = {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 1, 0, 0}, {1, 1, 0, 1}}; q[n_] := PalindromeQ @ FromDigits[Flatten @ v[[1 + Reverse @ Most[Mod[NestWhileList[(# - Mod[#, 4])/-4 &, n, # != 0 &], 4]]]]]; Select[Range[0, 10^4], q]

Formula

13 is a term since its base-(i-1) presentation is 100010001 which is palindromic.

A297265 Numbers whose base-8 digits have equal down-variation and up-variation; see Comments.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 18, 27, 36, 45, 54, 63, 65, 73, 81, 89, 97, 105, 113, 121, 130, 138, 146, 154, 162, 170, 178, 186, 195, 203, 211, 219, 227, 235, 243, 251, 260, 268, 276, 284, 292, 300, 308, 316, 325, 333, 341, 349, 357, 365, 373, 381, 390, 398, 406
Offset: 1

Views

Author

Clark Kimberling, Jan 15 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.
a(n) = A029803(n+1) for 1 <= n < 72, but a(72) = 521 differs from A029803(73) = 585. - Georg Fischer, Oct 30 2018

Examples

			406 in base-8:  6,2,6, having DV = 4, UV = 4, so that 406 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 = 8; 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]   (* A297264 *)
    Take[Flatten[Position[w, 0]], 120]    (* A297265 *)
    Take[Flatten[Position[w, 1]], 120]    (* A297266 *)

A256088 Non-palindromic balanced numbers in base 8.

Original entry on oeis.org

536, 608, 680, 706, 752, 778, 824, 850, 899, 922, 971, 994, 1049, 1072, 1121, 1144, 1193, 1219, 1265, 1291, 1337, 1363, 1412, 1435, 1484, 1507, 1562, 1585, 1634, 1657, 1706, 1732, 1778, 1804, 1850, 1876, 1925, 1948, 1997
Offset: 1

Views

Author

M. F. Hasler, Mar 14 2015

Keywords

Comments

Here a number is called balanced if the sum of digits weighted by their arithmetic distance from the "center" is zero. Since palindromes (A029803) are trivially balanced, they are excluded here.
This is the base-8 variant of the decimal version A256075 invented by Eric Angelini. See there, and the base-2 version A256082, for further information and examples.

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L, m,i;
      L:= convert(n, base, 8);
      m:= (1+nops(L))/2;
    add(L[i]*(i-m), i=1..nops(L))=0  and L <> ListTools:-Reverse(L)
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Nov 04 2024
  • PARI
    is(n,b=8,d=digits(n,b),o=(#d+1)/2)=!(vector(#d,i,i-o)*d~)&&d!=Vecrev(d)

A333423 Numbers that are palindromes in primorial base.

Original entry on oeis.org

0, 1, 3, 7, 9, 11, 31, 39, 47, 211, 217, 223, 229, 235, 243, 249, 255, 261, 267, 275, 281, 287, 293, 299, 2311, 2347, 2383, 2419, 2455, 2523, 2559, 2595, 2631, 2667, 2735, 2771, 2807, 2843, 2879, 30031, 30061, 30091, 30121, 30151, 30181, 30211, 30247, 30277, 30307
Offset: 1

Views

Author

Amiram Eldar, Mar 20 2020

Keywords

Examples

			3 is a term since its representation in primorial base is 11 (1 * 2# + 1) which is a palindrome.
7 is a term since its representation in primorial base is 101 (1 * 3# + 0 * 2# + 1 = 6 + 1) which is a palindrome.
		

Crossrefs

Programs

  • Mathematica
    max = 6; bases = Prime @ Range[max, 1, -1]; nmax = Times @@ bases - 1; Select[Range[0, nmax], PalindromeQ @ IntegerDigits[#, MixedRadix[bases]] &]

A319584 Numbers that are palindromic in bases 2, 4, and 8.

Original entry on oeis.org

0, 1, 3, 5, 63, 65, 195, 325, 341, 4095, 4097, 4161, 12291, 12483, 20485, 20805, 21525, 21845, 258111, 262143, 262145, 266305, 786435, 798915, 1310725, 1311749, 1331525, 1332549, 1376277, 1377301, 1397077, 1398101, 16515135, 16777215, 16777217, 16781313
Offset: 1

Views

Author

Jeremias M. Gomes, Sep 23 2018

Keywords

Comments

Intersection of A006995, A014192, and A029803.
From A.H.M. Smeets, Jun 08 2019: (Start)
Intersection of A006995 and A259382.
Intersection of A014192 and A259380.
Intersection of A029803 and A097856.
All repunit numbers in base 2 with 6*k digits are included in this sequence, i.e., all terms A000225(6*k) for k >= 0.
All repunit numbers in base 4 with 2+3*k digits are included in this sequence, i.e., all terms A002450(2+3*k) for k >= 0.
All terms A000051(6*k) for k > 0 are included in this sequence.
All terms A052539(3*k) for k > 0 are included in this sequence.
In general, for sequences with palindromic numbers in the set of bases {b, b^2, ..., b^k}, gaps of size 2 occur at the term pairs (b^(k!) - 1, b^(k!) + 1). See also A319598 for b = 2 and k = 4.
The terms occur in bursts with large gaps in between as shown in the scatterplots of log_b(a(n)-a(n-1)) versus log_b(n) and log_b(1-a(n-1)/a(n)) versus log_b(n). Terms of this sequence are those with b = 2 and k = 3. For comparison, terms with b = 3 and k = 3 are also shown in these plots.
(End)

Examples

			89478485 = 101010101010101010101010101_2 = 11111111111111_4 = 525252525_8.
		

Crossrefs

Cf. A006995 (base 2), A014192 (base 4), A029803 (base 8), A097956 (bases 2 and 4), A259380 (bases 2 and 8), A259382 (bases 4 and 8), A319598 (bases 2, 4, 8 and 16).

Programs

  • Magma
    [n: n in [0..2*10^7] | Intseq(n, 2) eq Reverse(Intseq(n, 2)) and Intseq(n, 4) eq Reverse(Intseq(n, 4)) and Intseq(n, 8) eq Reverse(Intseq(n, 8))]; // Vincenzo Librandi, Sep 24 2018
    
  • Mathematica
    palQ[n_, b_] := PalindromeQ[IntegerDigits[n, b]];
    Reap[Do[If[palQ[n, 2] && palQ[n, 4] && palQ[n, 8], Print[n]; Sow[n]], {n, 0, 10^6}]][[2, 1]] (* Jean-François Alcover, Sep 25 2018 *)
    Select[Range[0,168*10^5],AllTrue[Table[IntegerDigits[#,d],{d,{2,4,8}}],PalindromeQ]&] (* Harvey P. Dale, Jan 27 2024 *)
  • PARI
    ispal(n, b) = my(d=digits(n, b)); Vecrev(d) == d;
    isok(n) = ispal(n, 2) && ispal(n, 4) && ispal(n, 8); \\ Michel Marcus, Jun 11 2019
  • Python
    def nextpal(n, base): # m is the first palindrome successor of n in base base
        m, pl = n+1, 0
        while m > 0:
            m, pl = m//base, pl+1
        if n+1 == base**pl:
            pl = pl+1
        n = n//(base**(pl//2))+1
        m, n = n, n//(base**(pl%2))
        while n > 0:
            m, n = m*base+n%base, n//base
        return m
    def rev(n, b):
        m = 0
        while n > 0:
            n, m = n//b, m*b+n%b
        return m
    n, a = 1, 0
    while n <= 100:
        if a == rev(a, 4) == rev(a, 2):
            print(a)
            n += 1
        a = nextpal(a, 8) # A.H.M. Smeets, Jun 08 2019
    
  • Sage
    [n for n in (0..1000) if Word(n.digits(2)).is_palindrome() and Word(n.digits(4)).is_palindrome() and Word(n.digits(8)).is_palindrome()]
    

A319598 Numbers in base 10 that are palindromic in bases 2, 4, 8, and 16.

Original entry on oeis.org

0, 1, 3, 5, 4095, 4097, 12291, 20485, 21845, 16777215, 16777217, 16781313, 50331651, 50343939, 83886085, 83906565, 89458005, 89478485, 68702703615, 68719476735, 68719476737, 68736258049, 206158430211, 206208774147, 343597383685, 343602954245, 343681290245
Offset: 1

Views

Author

Jeremias M. Gomes, Sep 24 2018

Keywords

Comments

Intersection of A006995, A014192, A029803, and A029730.
This sequence is infinite because it contains terms of the forms 4096^k-1 (k>=0) and 4096^k+1 (k>0). - Bruno Berselli, Sep 24 2018

Examples

			4095 = 111111111111_2 = 333333_4 = 7777_8 = FFF_16. Hence 4095 is in the sequence.
		

Crossrefs

Cf. A006995 (base 2), A014192 (base 4), A029803 (base 8), and A029730 (base 16).

Programs

  • Mathematica
    palQ[n_, b_] := PalindromeQ[IntegerDigits[n, b]];
    Reap[Do[If[palQ[n, 2] && palQ[n, 4] && palQ[n, 8] && palQ[n, 16], Print[n]; Sow[n]], {n, 0, 10^6}]][[2, 1]] (* Jean-François Alcover, Sep 25 2018 *)
  • Sage
    [n for n in (0..100000) if Word(n.digits(2)).is_palindrome() and Word(n.digits(4)).is_palindrome() and Word(n.digits(8)).is_palindrome() and Word(n.digits(16)).is_palindrome()]

Extensions

a(19)-a(27) from Rémy Sigrist, Nov 15 2018

A046240 Cubes which are palindromes in base 8.

Original entry on oeis.org

0, 1, 27, 729, 274625, 389017, 135005697, 68769820673, 72043225281, 35187593412609, 18014604668698625, 18120364883707393, 9223385231000600577, 4722367327294625677313, 4725826936714463031297
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Intersection of A029803 and A000578.
Cf. A046239.

Formula

a(n) = A046239(n)^3. - Andrew Howroyd, Aug 10 2024

Extensions

Offset corrected by Andrew Howroyd, Aug 10 2024

A260184 Numbers n written in base 10 that are palindromic in exactly three bases b, 2 <= b <= 10 and not simultaneously bases 2, 4 and 8.

Original entry on oeis.org

9, 10, 21, 40, 55, 80, 85, 100, 130, 154, 164, 178, 191, 203, 235, 242, 255, 257, 273, 282, 292, 300, 328, 400, 455, 585, 656, 819, 910, 2709, 6643, 8200, 14762, 32152, 53235, 74647, 428585, 532900, 1181729, 1405397, 4210945, 5259525, 27711772, 719848917, 43253138565
Offset: 1

Views

Author

Keywords

Examples

			273 is in the sequence because 100010001_2 = 101010_3 = 10101_4 = 2043_5 = 1133_6 = 540_7 = 421_8 = 333_9 = 273_10 and three of the bases, namely 2, 4 & 9, yield palindromes.
		

Crossrefs

Programs

  • Mathematica
    (* see A214425 and set all terms as lst, then *)
    gQ[n_] := Count[ palQ[n,#] & /@ {2, 4, 8}, True];
    Select[ lst, gQ[#] != 3 &]

Formula

The intersection of A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955 & A002113 which yields just three members, not simultaneously bases 2, 4 and 8.

A043026 Base-8 palindromes that start with 6.

Original entry on oeis.org

6, 54, 390, 398, 406, 414, 422, 430, 438, 446, 3078, 3150, 3222, 3294, 3366, 3438, 3510, 3582, 24582, 24646, 24710, 24774, 24838, 24902, 24966, 25030, 25102, 25166, 25230, 25294, 25358, 25422, 25486, 25550, 25622, 25686
Offset: 1

Views

Author

Keywords

Crossrefs

Previous Showing 21-30 of 33 results. Next