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.

A082216 Smallest palindrome beginning with n.

This page as a plain text file.
%I A082216 #19 Apr 15 2021 01:01:44
%S A082216 0,1,2,3,4,5,6,7,8,9,101,11,121,131,141,151,161,171,181,191,202,212,
%T A082216 22,232,242,252,262,272,282,292,303,313,323,33,343,353,363,373,383,
%U A082216 393,404,414,424,434,44,454,464,474,484,494,505
%N A082216 Smallest palindrome beginning with n.
%H A082216 T. D. Noe, <a href="/A082216/b082216.txt">Table of n, a(n) for n = 0..10000</a>
%F A082216 a(A002113(n)) = A002113(n). - _Chai Wah Wu_, Apr 13 2021
%o A082216 (Python)
%o A082216 def A082216(n):
%o A082216     s = str(n)
%o A082216     t = s[::-1]
%o A082216     if s == t:
%o A082216         return n
%o A082216     for i in range(1,len(s)):
%o A082216         if s[i:] == t[:-i]:
%o A082216             return int(s+t[-i:]) # _Chai Wah Wu_, Apr 13 2021
%Y A082216 Cf. A002113, A056544.
%K A082216 base,easy,nonn
%O A082216 0,3
%A A082216 _Amarnath Murthy_, Apr 08 2003
%E A082216 Corrected by _T. D. Noe_, Mar 10 2011
%E A082216 a(0) added by _Chai Wah Wu_, Apr 14 2021