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-40 of 55 results. Next

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

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.

A350990 Triangular numbers that are palindromes in base 3.

Original entry on oeis.org

0, 1, 10, 28, 91, 820, 7381, 65341, 66430, 597871, 1633528, 5380840, 48339028, 48427561, 139386556, 435848050, 1178284240, 3529890253, 3922632451, 32614707700, 35296517971, 35303692060, 101891588176, 292358957446, 295883935480, 317733228541, 859413596320, 2649105942220
Offset: 1

Views

Author

Amiram Eldar, Jan 28 2022

Keywords

Comments

This sequence is infinite since A000217((3^k-1)/2) is a term for all k >= 0 (Trigg, 1971).

Examples

			10 is a term since 10 = A000217(4) is a triangular number and also a palindromic number in base 3: 10 = 101_3.
28 is a term since 28 = A000217(7) is a triangular number and also a palindromic number in base 3: 36 = 1001_3.
		

Crossrefs

Intersection of A000217 and A014190.
The ternary version of A003098.

Programs

  • Mathematica
    t[n_] := n*(n + 1)/2; Select[t /@ Range[0, 3*10^5], PalindromeQ[IntegerDigits[#, 3]] &]

A173019 a(n) is the value of row n in triangle A083093 seen as ternary number.

Original entry on oeis.org

1, 4, 16, 28, 112, 448, 784, 3136, 12301, 19684, 78736, 314944, 551152, 2204608, 8818432, 15432256, 61729024, 242132884, 387459856, 1549839424, 6199180549, 10848875968, 43395503872, 173577055372, 303766932781, 1215067731124
Offset: 0

Views

Author

Michael Thaler (michael_thaler(AT)brown.edu), Nov 07 2010

Keywords

Comments

Previous name was "Pascal's Triangle mod 3 converted to decimal."
If 2|a(n), then 4|a(n).
If 8|a(n), then 16|a(n).
If a(n)=4*a(n-1), then 3 does not divide n.
The first few odd values for a(n) are a(0)=1, a(8)=12301, a(20)=6199180549, a(24)=303766932781.
It appears that, as the terms of A001317 (analogous to this sequence, using binary instead of ternary) can be uniquely represented as products of Fermat numbers, the terms of this sequence can be represented as products from a nontrivial set of numbers. - Thomas Anton, Oct 27 2018
Subsequence of A014190. - Chai Wah Wu, Jul 30 2025

Examples

			a(9) = 3^(3^2) + 1 = 19684;
a(8) = (5*19684 - 12)/8 = 12301;
a(10) = 4*19684 = 78736.
		

Crossrefs

Cf. A006940 (takes these values and converts them to decimal notation).

Programs

  • Haskell
    a173019 = foldr (\t v -> 3 * v + t) 0 . map toInteger . a083093_row
    -- Reinhard Zumkeller, Jul 11 2013
    
  • Mathematica
    FromDigits[#, 3] & /@ Table[Mod[Binomial[n, k], 3], {n, 0, 25}, {k, 0, n}] (* Michael De Vlieger, Oct 31 2018 *)
  • PARI
    a(n) = my(v = vector(n+1, k, binomial(n, k-1))); fromdigits(apply(x->x % 3, v), 3); \\ Michel Marcus, Nov 21 2018
    
  • Python
    from math import prod, comb
    from gmpy2 import digits
    def A173019(n):
        if n==0: return 1
        c, l = '', len(s:=digits(n,3))
        for k in range(m:=n+2>>1):
            t = digits(k,3).zfill(l)
            c += str(prod(comb(int(s[i]),int(t[i]))%3 for i in range(l))%3)
        return int(c+c[m-2+(n&1)::-1],3) # Chai Wah Wu, Jul 30 2025

Formula

a(3^n) = 3^(3^n) + 1.
a(3^n) = (8*a((3^n)-1) + 12)/5. [5*a(3^n) = 1200...0012 (base 3), 8*a((3^n)-1) = (22)(1212...2121) = 11222...2202 (base 3).]
For n > 0, a((3^n)+1) = 4*a(3^n) and a((3^n)+2) = 4*a((3^n)+1).
a(n) = Sum_{k=0..n} A083093(n,k) * 3^k. - Reinhard Zumkeller, Jul 11 2013

Extensions

a(13) and a(19) corrected and name clarified by Tom Edgar, Oct 11 2015

A330313 Add the odd terms and subtract the even ones, the result must always be a palindrome in base 3. This is the lexicographically earliest sequence of distinct positive integers with this property.

Original entry on oeis.org

1, 3, 2, 11, 7, 4, 6, 8, 21, 5, 12, 14, 89, 9, 18, 26, 16, 20, 10, 13, 17, 24, 75, 39, 30, 32, 23, 51, 31, 22, 43, 34, 48, 44, 28, 36, 19, 29, 42, 81, 68, 33, 35, 69, 60, 72, 63, 73, 52, 56, 40, 105, 61, 70, 84, 93, 91, 82, 50, 41, 98, 45, 53, 103, 64, 78, 54, 123, 128, 57, 71, 129
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2019

Keywords

Comments

A base 3 analog of A329544. The latter has an exceptionally irregular graph, so it is natural to ask if the graph is more understandable in a smaller base (and base 2 does not work).

Crossrefs

Cf. A014190, A329544, A330312, A330314 (running totals).

A331892 Positive numbers k such that the negabinary expansion (A039724) of -k is palindromic.

Original entry on oeis.org

1, 5, 7, 17, 21, 31, 35, 57, 65, 85, 93, 119, 127, 147, 155, 201, 217, 257, 273, 325, 341, 381, 397, 455, 471, 511, 527, 579, 595, 635, 651, 745, 777, 857, 889, 993, 1025, 1105, 1137, 1253, 1285, 1365, 1397, 1501, 1533, 1613, 1645, 1767, 1799, 1879, 1911, 2015
Offset: 1

Views

Author

Amiram Eldar, Jan 30 2020

Keywords

Comments

Numbers of the form 2^(2*m-1) - 1 (A083420) and 2^(2*m) + 1 (A052539) are terms.

Examples

			5 is a term since the negabinary representation of -5 is 1111 which is palindromic.
		

Crossrefs

Programs

  • Mathematica
    negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; Select[Range[2000], PalindromeQ @ negabin[-#] &]

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]] &]

A077402 Reverse and Add! carried out in base 3; number of steps needed to reach a palindrome, or -1 if no palindrome is ever reached.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 2, 3, 0, 4, 1, 2, 0, 1, 2, 0, 3, 4, 0, 1, 0, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 0, 2, 3, 3, 2, 1, 1, 2, 3, 3, 2, 3, 0, 18, 1, 2, 0, 1, 2, 4, 1, 2, 2, 1, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 2, 3, 2, 4, 17, 18, 0, 1, 0, 2, 1, 1, 2, 1, 1, 3, 1, 0, 2, 1, 1, 16, 1, 1, 2, 2, 0, 2, 4, -1, 16, 3, 15, 2, 1, 1, 2, 1, 0, 3, 3, 3, 2, 1, 1, 16, 1
Offset: 0

Views

Author

Klaus Brockhaus, Nov 05 2002

Keywords

Comments

Base-3 analog of A066057 (base 2), A075685 (base 4) and A033665 (base 10). a(103) = -1 is a conjecture (cf. A066450, A077408). For values of n such that presumably a(n) = -1 see A077404.

Examples

			17 (decimal) = 122 -> 122 + 221 = 1120 -> 1120 + 211 = 2101 -> 2101 + 1012 = 10120 -> 10120 + 2101 = 12221 (palindrome) = 160 (decimal) requires 4 steps, so a(17) = 4.
		

Crossrefs

Programs

  • ARIBAS
    m := 120; stop := 1000; for n := 0 to m do v := -1; c := 0; k := n; while c < stop do d := k; rev := 0; while d > 0 do rev := 3*rev + (d mod 3); d := d div 3; end; if k = rev then v := c; c := stop; else inc(c); k := k + rev; end; end; write(v,","); end;

A321473 Nonnegative numbers whose nonzero digits in ternary expansion are palindromic.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 16, 18, 20, 23, 24, 26, 27, 28, 30, 31, 34, 36, 37, 39, 40, 46, 48, 52, 54, 56, 59, 60, 62, 65, 68, 69, 72, 74, 78, 80, 81, 82, 84, 85, 88, 90, 91, 93, 94, 100, 102, 106, 108, 109, 111, 112, 117, 118, 120, 121, 130, 136, 138
Offset: 1

Views

Author

Rémy Sigrist, Nov 11 2018

Keywords

Comments

This sequence corresponds to the fixed points of A321464, and contains A014190.

Examples

			For n = 1594426:
- the ternary expansion of 1594426 is "10000000010211",
- the corresponding nonzero digits are "11211", which are palindromic,
- hence 1594426 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,200],PalindromeQ[FromDigits[IntegerDigits[#,3]/.(0-> Nothing)]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 22 2020 *)
  • PARI
    is(n, base=3) = my (t=select(sign, digits(n, base))); t==Vecrev(t)
Previous Showing 31-40 of 55 results. Next