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

A262188 Table read by rows: row n contains all distinct palindromes contained as substrings in decimal representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 1, 11, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 0, 2, 1, 2, 2, 22, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 0, 3, 1, 3, 2, 3, 3, 33, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 0, 4, 1, 4, 2, 4, 3, 4, 4, 44, 4, 5, 4, 6, 4
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 14 2015

Keywords

Comments

Length of row n = A262190(n);
T(n,0) = A054054(n);
T(n,A262190(n)-1) = A047813(n).

Examples

			.     n |  T(n,*)           n |  T(n,*)              n |  T(n,*)
.  -----+-----------    ------+-------------    -------+--------------
.   100 |  0,1           1000 |  0,1             10000 |  0,1
.   101 |  0,1,101       1001 |  0,1,1001        10001 |  0,1,10001
.   102 |  0,1,2         1002 |  0,1,2           10002 |  0,1,2
.   103 |  0,1,3         1003 |  0,1,3           10003 |  0,1,3
.   104 |  0,1,4         1004 |  0,1,4           10004 |  0,1,4
.   105 |  0,1,5         1005 |  0,1,5           10005 |  0,1,5
.   106 |  0,1,6         1006 |  0,1,6           10006 |  0,1,6
.   107 |  0,1,7         1007 |  0,1,7           10007 |  0,1,7
.   108 |  0,1,8         1008 |  0,1,8           10008 |  0,1,8
.   109 |  0,1,9         1009 |  0,1,9           10009 |  0,1,9
.   110 |  0,1,11        1010 |  0,1,101         10010 |  0,1,1001
.   111 |  1,11,111      1011 |  0,1,11,101      10011 |  0,1,11,1001
.   112 |  1,2,11        1012 |  0,1,2,101       10012 |  0,1,2,1001
.   113 |  1,3,11        1013 |  0,1,3,101       10013 |  0,1,3,1001
.   114 |  1,4,11        1014 |  0,1,4,101       10014 |  0,1,4,1001
.   115 |  1,5,11        1015 |  0,1,5,101       10015 |  0,1,5,1001
.   116 |  1,6,11        1016 |  0,1,6,101       10016 |  0,1,6,1001
.   117 |  1,7,11        1017 |  0,1,7,101       10017 |  0,1,7,1001
.   118 |  1,8,11        1018 |  0,1,8,101       10018 |  0,1,8,1001
.   119 |  1,9,11        1019 |  0,1,9,101       10019 |  0,1,9,1001
.   120 |  0,1,2         1020 |  0,1,2           10020 |  0,1,2
.   121 |  1,2,121       1021 |  0,1,2           10021 |  0,1,2
.   122 |  1,2,22        1022 |  0,1,2,22        10022 |  0,1,2,22
.   123 |  1,2,3         1023 |  0,1,2,3         10023 |  0,1,2,3
.   124 |  1,2,4         1024 |  0,1,2,4         10024 |  0,1,2,4
.   125 |  1,2,5         1025 |  0,1,2,5         10025 |  0,1,2,5  .
		

Crossrefs

Cf. A262190 (row lengths), A054054 (left edge), A047813 (right edge), A136522, A002113.

Programs

  • Haskell
    import Data.List (inits, tails, nub, sort)
    a262188 n k = a262188_tabf !! n !! k
    a262188_row n = a262188_tabf !! n
    a262188_tabf = map (sort . nub . map (foldr (\d v -> 10 * v + d) 0) .
       filter (\xs -> length xs == 1 || last xs > 0 && reverse xs == xs) .
              concatMap (tail . inits) . tails) a031298_tabf
    
  • PARI
    A262188_row(n,b=10)=Set(concat(vector(logint(n+!n,b)+1,m,m=n\=b^(m>1);select(is_A002113,vector(logint(m+!m,b)+1,k,m%b^k))))) \\ M. F. Hasler, Jun 19 2018

A262224 a(n+1) = a(n) + (largest palindrome in decimal representation of a(n)), a(0) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 22, 44, 88, 176, 183, 191, 382, 390, 399, 498, 507, 514, 519, 528, 536, 542, 547, 554, 609, 618, 626, 1252, 1504, 1509, 1518, 1669, 1735, 1742, 1749, 1758, 1766, 1832, 1840, 1848, 2696, 3392, 3425, 3430, 3773, 7546, 7553, 7608, 7616, 8232
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2015

Keywords

Comments

a(n+1) = a(n) + A047813(a(n)) = A262223(a(n)).

Crossrefs

Cf. A047813, A262223, A262243 (first differences).

Programs

  • Haskell
    a262224' n = a262224_list' !! n
    a262224_list' = iterate a262223 1

A046260 Largest palindromic substring in 2^n.

Original entry on oeis.org

1, 2, 4, 8, 6, 3, 6, 8, 6, 5, 4, 8, 9, 9, 8, 8, 55, 131, 262, 242, 8, 9, 9, 838, 777, 55, 88, 77, 545, 9, 737, 474, 949, 858, 717, 383, 767, 9, 77, 888, 777, 255552, 111, 222, 444, 888, 77, 3553, 767, 21312, 42624, 99, 737, 474, 9, 797, 575, 8558, 7117, 646, 606, 939
Offset: 0

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Examples

			2^41 = 2199023{255552}.
		

Crossrefs

Programs

  • Python
    def c(s): return s[0] != "0" and s == s[::-1]
    def a(n):
        s = str(2**n)
        ss = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1))
        return max(int(w) for w in ss if c(w))
    print([a(n) for n in range(62)]) # Michael S. Branicky, Sep 18 2022

Formula

a(n) = A047813(A000079(n)). - Michel Marcus, Sep 19 2022

A262223 a(n) = n + largest palindrome contained in decimal representation of n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 22, 14, 16, 18, 20, 22, 24, 26, 28, 22, 23, 44, 26, 28, 30, 32, 34, 36, 38, 33, 34, 35, 66, 38, 40, 42, 44, 46, 48, 44, 45, 46, 47, 88, 50, 52, 54, 56, 58, 55, 56, 57, 58, 59, 110, 62, 64, 66, 68, 66, 67, 68, 69, 70, 71
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2015

Keywords

Comments

a(n) = n + A047813(n).

Crossrefs

Cf. A047813, A262224 (iteration, start = 1).

Programs

  • Haskell
    a262223 n = n + a047813 n

A262243 First differences of A262224.

Original entry on oeis.org

1, 2, 4, 8, 6, 22, 44, 88, 7, 8, 191, 8, 9, 99, 9, 7, 5, 9, 8, 6, 5, 7, 55, 9, 8, 626, 252, 5, 9, 151, 66, 7, 7, 9, 8, 66, 8, 8, 848, 696, 33, 5, 343, 3773, 7, 55, 8, 616, 232, 464, 9, 9, 9, 55, 9, 9, 9, 9, 9, 55, 11, 121, 242, 484, 99, 7, 7, 8, 9, 9, 101, 8
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2015

Keywords

Comments

All terms are palindromic by definition of A262224.

Crossrefs

Programs

  • Haskell
    a262243 n = a262243_list !! n
    a262243_list = zipWith (-) (tail a262224_list) a262224_list

Formula

a(n) = A262224(n+1) - A262224(n) = A047813(A262224(n)).

A184988 Largest palindromic substring of n^2.

Original entry on oeis.org

0, 1, 4, 9, 6, 5, 6, 9, 6, 8, 1, 121, 44, 9, 9, 22, 6, 9, 4, 6, 4, 44, 484, 9, 7, 6, 676, 9, 8, 8, 9, 9, 4, 9, 11, 22, 9, 9, 444, 5, 6, 8, 7, 9, 9, 202, 11, 22, 4, 4, 5, 6, 7, 9, 9, 5, 313, 9, 33, 8, 6, 7, 44, 969, 9, 22, 6, 44, 6, 7, 9, 5, 8, 9, 7, 6, 77, 929
Offset: 0

Views

Author

Jonathan Vos Post, Mar 27 2011

Keywords

Comments

Leading 0's are not allowed, so a(103) = 9, not 060. - Robert Israel, Nov 05 2020

Examples

			a(15) = largest palindromic substring of 15^2 = largest palindromic substring of 225 = 22.
		

Crossrefs

Programs

  • Maple
    g:= proc(S) S[1] <> "0" and S = StringTools:-Reverse(S) end proc:
    f:= proc(n) local S,d,l,i,Q;
      S:= sprintf("%d",n^2);
      d:= length(S);
      for l from d to 1 by -1 do
        Q:= select(g, [seq(S[i..i+l-1],i=1..d+1-l)]);
        if Q <> [] then return op(sscanf(max(Q),"%d")) fi
      od;
    end proc:
    f(0):= 0:
    map(f, [$0..200]); # Robert Israel, Nov 05 2020

Formula

a(n) = A047813(A000290(n)).

A331804 a(n) is the largest positive integer occurring, when written in binary, as a substring in both binary n and its reversal (A030101(n)).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 5, 3, 5, 7, 15, 1, 17, 9, 9, 5, 21, 6, 7, 3, 9, 5, 27, 7, 7, 15, 31, 1, 33, 17, 17, 9, 9, 9, 9, 5, 9, 21, 21, 6, 45, 14, 15, 3, 17, 9, 51, 5, 21, 27, 27, 7, 9, 7, 27, 15, 15, 31, 63, 1, 65, 33, 33, 17, 17, 17, 17, 9, 73, 10, 9
Offset: 0

Views

Author

Rémy Sigrist, Jan 26 2020

Keywords

Comments

We set a(0) = 0 by convention.
a(7479) = 29 ("11101" in binary) is the first term that does not belong to A057890.

Examples

			The first terms, alongside the binary representations of n and of a(n), are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     1      10          1
   3     3      11         11
   4     1     100          1
   5     5     101        101
   6     3     110         11
   7     7     111        111
   8     1    1000          1
   9     9    1001       1001
  10     5    1010        101
  11     5    1011        101
  12     3    1100         11
		

Crossrefs

Programs

  • PARI
    sub(n) = { my (b=binary(n), s=[0]); for (i=1, #b, if (b[i], for (j=i, #b, s=setunion(s, Set(fromdigits(b[i..j], 2)))))); return (s) }
    a(n) = my (i=setintersect(sub(n), sub(fromdigits(Vecrev(binary(n)),2)))); i[#i]

Formula

a(n) = A175466(n, A030101(n)) for any n > 0.
a(n) <= n with equality iff n is a binary palindrome (A006995).
Showing 1-7 of 7 results.