Search a number
magnanimous n.  and  modest n.

First numbers that belong to both sets:

23, 29, 49, 89, 203, 209, 809, 4027, 8009, 80009.