login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A371966
Largest number reachable starting from 1 and taking n steps either doubling or doubling+reversing.
2
1, 2, 4, 8, 61, 221, 442, 884, 8671, 24371, 60721, 244121, 881371, 2898371, 8692591, 48826601, 97653202, 484336211, 968672422, 6847550561, 24334620331, 68473110671, 247696944631, 884738088671, 2892570042961, 8872433043671, 44817108207511, 89634216415022, 486415512459511
OFFSET
0,2
COMMENTS
At each step you are allowed to either double x -> 2*x or double and reverse x -> R(2*x), where R(x) = A004086(x) is decimal digit reversal.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..34
FORMULA
a(n) <= 20^n and a(n+1) <= 20*a(n).
EXAMPLE
a(4) = 61 by the path 1, 2, 4, 8, 61.
PROG
(Python)
from itertools import islice
def reverse(n): return int(str(n)[::-1])
def agen(): # generator of terms
reach = {1}
while True:
yield max(reach)
newreach = set()
for q in reach: newreach.update([2*q, reverse(2*q)])
reach = newreach
print(list(islice(agen(), 28))) # Michael S. Branicky, Apr 14 2024
CROSSREFS
Sequence in context: A028910 A018482 A036447 * A263451 A339951 A069027
KEYWORD
nonn,base
AUTHOR
STATUS
approved