A088882 Nontrivial palindromes in base 10 (i.e., palindromes that are not RepDigits such as 3, 111, 22222, or 888888888).
101, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 454, 464, 474, 484, 494, 505, 515, 525, 535, 545, 565, 575, 585, 595, 606, 616, 626, 636, 646, 656, 676
Offset: 1
Examples
a(4) = 141 because 141 is the fourth term of the sequence of base-10 palindromes (A002113) that does not appear in the sequence of RepDigits (A010785).
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Python
from itertools import count, islice, product def agen(): # generator of terms digits = "0123456789" for d in count(3): for p in product(digits, repeat=d//2): if d > 1 and p[0] == "0": continue left = "".join(p); right = left[::-1] for mid in [[""], digits][d%2]: t = left + mid + right if len(set(t)) != 1: yield int(t) print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022
Comments