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.

A056544 Smallest palindrome containing the digits of n as a subsequence.

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Feb 10 2002

Keywords

Examples

			The smallest palindrome containing 21 as a subsequence is 121. So a(21) = 121.
		

Crossrefs

Cf. A002113, A082216, A145800 (binary variant).

Programs

  • Mathematica
    Do[k = 1; While[ StringPosition[ ToString[k], ToString[n]] == {} || ToString[k] != StringReverse[ ToString[k]], k++ ]; Print[k], {n, 1, 70} ]
  • PARI
    See Links section.

Formula

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

Extensions

Edited and extended by Robert G. Wilson v, Feb 12 2002