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.

A082216 Smallest palindrome beginning with n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 101, 11, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 22, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 33, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 44, 454, 464, 474, 484, 494, 505
Offset: 0

Views

Author

Amarnath Murthy, Apr 08 2003

Keywords

Crossrefs

Programs

  • Python
    def A082216(n):
        s = str(n)
        t = s[::-1]
        if s == t:
            return n
        for i in range(1,len(s)):
            if s[i:] == t[:-i]:
                return int(s+t[-i:]) # Chai Wah Wu, Apr 13 2021

Formula

a(A002113(n)) = A002113(n). - Chai Wah Wu, Apr 13 2021

Extensions

Corrected by T. D. Noe, Mar 10 2011
a(0) added by Chai Wah Wu, Apr 14 2021

A082217 Smallest palindrome beginning with n and digit sum n, or 0 if no such number exists.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10801, 11711, 12621, 13531, 14441, 15351, 16261, 17171, 1881, 0, 208802, 2139312, 227722, 2329232, 246642, 2519152, 265562
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Shrikant (menakan_s(AT)yahoo.com), Apr 09 2003

Keywords

Comments

a(19) = 0. This is the only zero in the sequence. Every other integer k > 9 has digit sum <= k/2, so the center can always be filled in to make a palindrome.

Crossrefs

Showing 1-2 of 2 results.