[go: up one dir, main page]

login
A333375
Start with a(0) = a(1) = 1. If a(n) = n is the rightmost term defined so far, let a(m) = m := n + a(n-1). If the terms between a(n) and a(m) are undefined, let a(n+1) = a(n) + a(m) and if m > n+1, a(m-1) = a(n+1) + a(m).
0
1, 1, 2, 3, 8, 5, 18, 49, 129, 338, 209, 80, 31, 13, 57, 158, 417, 1093, 2862, 7493, 19617, 51358, 134457, 352013, 921582, 2412733, 6316617, 16537118, 43294737, 70052356, 26757619, 10220501, 3903884, 1491151, 569569, 217556, 83099, 31741, 12124, 4631, 1769, 676, 259, 101, 44
OFFSET
0,3
COMMENTS
The term a(0) = 1 is by convention.
The first (smallest) term which is not a Fibonacci number (A000045) is a(6) = 18, cf. Example. Between two subsequent local minima of the form a(n) = n there is a finite Fibonacci-like subsequence having the two "boundary values" as initial terms, subsequent terms alternatingly to the left and to the right, and ending in a local maximum in the middle.
The sequence of successive rightmost terms (and also local minima, except for 2 and 3) is (1, 2, 3, 5, 13, 44, 145, 479, 1582, 5225, 17257, ...), cf. SeqFan post.
LINKS
M. F. Hasler, in reply to Ali Sada, I need help with defining these 3 sequences, SeqFan list, Mar 04 2020
EXAMPLE
After a(0) = a(1) = 1, the last term defined is a(n) = n with n = 1, so we let a(m) = m with m := n + a(n-1) = 1 + a(0) = 2, i.e., a(2) = 2.
Then the same rule applies again to give a(3) = 3, and once again to give a(5) = 5.
Now the term between a(3) and a(5) is undefined, and the second rule gives a(4) = a(3) + a(5) = 8. (The rules may in principle be applied in any order, but this a(4) is needed to compute the next term according to the first rule.)
Then the first rule applies again with n = 5. So we compute m = 5 + a(4) = 13, which gives a(13) = 13.
Now we have a gap of 7 undefined terms between a(5) and a(13). Following the second rule, we have a(6) = a(5) + a(13) = 18 and a(12) = a(6) + a(13) = 18 + 13 = 31. (These are the first terms which are not a Fibonacci number (A000045), since they are no more the sum of the two largest terms used so far.) We repeat (with n = 6, m = 12, etc.) until all "holes" are filled, although we can already now also apply the first rule to go further to the right:
As soon as we have computed a(12), we know that a(m) = m for m = a(13) + a(12) = 13 + 31 = 44. Then we can go further as soon as we have computed a(43), after a(14).
PROG
(PARI) {a=Vec(m=1, 44); while(#a >= m = a[n=m]+a[n-(n>1)], a[m]=m; for(k=1, m-n-1, a[ if( k%2, n+k\/2, m-k\2 )] = a[n+k\2]+a[m-k\/2+1] )); a}
CROSSREFS
Cf. A000045.
Sequence in context: A208449 A346957 A062956 * A289667 A053650 A377486
KEYWORD
nonn
AUTHOR
Ali Sada and M. F. Hasler, Mar 17 2020
STATUS
approved