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

A052058 Numbers k such that the largest palindromic substring (without leading zeros) of 2^k is a repdigit of minimum length 2.

Original entry on oeis.org

16, 24, 25, 26, 27, 38, 39, 40, 42, 43, 44, 45, 46, 51, 95, 96, 108, 169, 191, 193, 198, 202, 205, 247, 250, 316, 317, 379, 386, 421, 422, 423, 425, 485, 486, 488, 589, 592, 642, 643, 659, 731, 736, 758, 759, 800, 835, 839, 927, 971, 972, 978
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Examples

			2^44 = 175921860{444}16 and this repdigit 444 is its largest palindromic substring.
		

Crossrefs

Extensions

Offset changed to 1 by Jon E. Schoenfield, Oct 17 2019

A052059 Least k such that the longest palindromic substring (without leading zeros) contained in 2^k has length n.

Original entry on oeis.org

0, 16, 17, 47, 49, 41, 146, 274, 76, 468, 1622, 4381, 2961, 12799, 4292, 28493, 34597, 16276
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Comments

a(12) > 3000. - Erich Friedman, Feb 19 2000
a(16) > 15000. - Sean A. Irvine, Oct 19 2021
No other terms <= 35000. - Michael S. Branicky, Nov 12 2021

Examples

			a(3) = 17 since 2^17 = {131}072.
		

Crossrefs

Programs

  • Python
    def ispal(s): return s == s[::-1]
    def longestpalss(n):
        s = str(n)
        for l in range(len(s), 0, -1):
            for offset in range(len(s)-l+1):
                if s[offset] != '0' and ispal(s[offset:offset+l]):
                    return l
    def a(n):
        k, pow2 = 0, 1
        while longestpalss(pow2) != n: k += 1; pow2 <<= 1
        return k
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Nov 12 2021

Extensions

a(11)=1445 from Erich Friedman, Feb 19 2000
Title clarified, a(11) corrected, and a(12)-a(15) from Sean A. Irvine, Oct 19 2021
a(16)-a(18) from Michael S. Branicky, Nov 12 2021
Showing 1-2 of 2 results.