OFFSET
1,3
COMMENTS
a(n) is the smallest f(n) such that f(1)=f(2)=1 and f(i) = OpNoz_i(f(i-1)+f(i-2)) for 2<i<=n, where OpNoz_i is a function that either removes zero digits or keeps the value unchanged (the choice is made for each value of i).
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
FORMULA
EXAMPLE
a(23) = 1657 via the path: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 1946, 8711, 1657.
PROG
(Python)
def a(n):
reach = {(1, 1)}
for _ in range(n-1):
newreach = set()
for a, b in reach:
newreach.update([(b, a+b), (b, int(str(a+b).replace('0', '')))])
reach = newreach
return min(reach, key = lambda k:k[0])[0]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Bryle Morga, Jul 02 2024
STATUS
approved