OFFSET
1,3
COMMENTS
Numbers that are symmetric about a vertical mirror.
2 and 5 are taken as mirror images (as on calculator displays).
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..2500 from Nathaniel Johnston)
MAPLE
compdig := proc(n) if(n=2)then return 5: elif(n=5)then return 2: elif(n=0 or n=1 or n=8)then return n: else return -1: fi: end: isA053701 := proc(n) local d, l, j: d:=convert(n, base, 10): l:=nops(d): for j from 1 to ceil(l/2) do if(not d[j]=compdig(d[l-j+1]))then return false: fi: od: return true: end: for n from 0 to 10000 do if(isA053701(n))then printf("%d, ", n): fi: od: # Nathaniel Johnston, May 17 2011
PROG
(Python)
from itertools import count, islice, product
def lr(s): return s[::-1].translate({ord('2'):ord('5'), ord('5'):ord('2')})
def A053701gen(): # generator of terms
yield from [0, 1, 8]
for d in count(2):
for first in "1258":
for rest in product("01258", repeat=d//2-1):
left = first + "".join(rest)
for mid in [[""], ["0", "1", "8"]][d%2]:
yield int(left + mid + lr(left))
print(list(islice(A053701gen(), 45))) # Michael S. Branicky, Jul 09 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Henry Bottomley, Feb 14 2000
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Oct 01 2001
STATUS
approved