OFFSET
1,1
COMMENTS
This is a proper subsequence of A248753 (where the index does not need to be palindromic).
EXAMPLE
11 is a term because the eleventh palindrome is 11.
1111 is a member because it is the 111th palindrome.
12221 is in the sequence because the 222nd palindrome is 12221.
MATHEMATICA
(* first load 'nthPalindrome' from A002113 and then *) nPal[n_] := nthPalindrome[n - 1]; fQ[n_] := StringPosition[ ToString[ nPal[ nPal[ k]]], ToString[ nPal[ n]]] != {}; k = 2; lst = {}; While[k < 501, If[ fQ[k], AppendTo[lst, nPal[ nPal[ k]] ]]; k++]; lst
PROG
(Python)
from itertools import count, islice
def A248754_gen(): # generator of terms
def f(n):
y = 10*(x:=10**(len(str(n>>1))-1))
return (c:=n-x)*x+int(str(c)[-2::-1] or 0) if n<x+y else (c:=n-y)*y+int(str(c)[::-1] or 0)
for n in count(2):
if str(m:=f(n)) in str(k:=f(m)):
yield k
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Robert G. Wilson v, Oct 13 2014
STATUS
approved