OFFSET
0,1
COMMENTS
The sequence can also be built up from left to right directly (without having to make insertions) as follows:
a(0) equals greatest odd Fibonacci number less than n, i.e., [a(0) = F(2m)]
The rule for a(n+1) is according to the following (first listed takes priority):
a(n+1) = a(n) + F(2m) if less than or equal to n
a(n+1) = a(n) - F(2m-1) if greater than 0
a(n+1) = a(n) + F(2m-2)
Continue until all n terms have been included in the sequence.
LINKS
Kenneth J Ramsey, Sep 05 2007, Table of n, a(n) for n = 0..299
FORMULA
The sequence is generated starting with {2,1} and the numbers 3,4,5,..n are inserted in order into the sequence using the following rules: If n is an even Fibonacci number, it is inserted after the last term If n is an odd Fibonacci number, it is inserted before the first term If n is not a Fibonacci number, it is inserted between the adjacent terms, n - GF(even) and n-GF(odd) where GF(odd) and GF(even) are respectively the greatest odd and even Fibonacci numbers less than n.
EXAMPLE
4 appears between 2 and 1 in the sequence because the greatest odd Fibonacci number less than 4 is 2 and the greatest even Fibonacci number less than 4 is 3
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Kenneth J Ramsey, Sep 05 2007
STATUS
approved