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”).

A374266
Smallest number reachable by a Fibonacci-like iteration where one has the option to either omit or keep zero digits.
1
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 61, 438, 499, 937, 1436, 2373, 389, 2762, 1657, 1368, 325, 1693, 218, 1911, 2129, 44, 1516, 129, 394, 37, 53, 9, 62, 35, 133, 24, 121, 181, 95, 69, 11, 53, 19, 9, 19, 19, 2, 12, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4
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).
Choosing to always remove zero digits at each step gives A243063. This strategy of always choosing to remove zeros is optimal for n < 23. For n >= 23, a(n) < A243063(n), i.e., the optimal path contains a step that keeps zeros.
Removal of zeros preserves the digital root giving the lower bound a(n) >= A030132(n). In fact, for n >= 53, a(n) = A030132(n). It follows that this sequence is eventually periodic with a period of 24.
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
a(n) <= A243063(n); Strict inequality for n >= 23.
a(n) = A030132(n) and a(n) = a(n+24) for n >= 53.
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]
KEYWORD
nonn,base,easy
AUTHOR
Bryle Morga, Jul 02 2024
STATUS
approved