Let $n\ge 2$ be a positive integer. Find the number of functions $f:\{1,2,\ldots ,n\}\rightarrow\{1,2,3,4,5 \}$ which have the following property: $|f(k+1)-f(k)|\ge 3$, for any $k=1,2,\ldots n-1$. Vasile Pop
Problem
Source: Romanian TST 2000
Tags: function, algebra proposed, algebra
15.02.2011 18:41
We wish to find all the $n-$tuples with elements $\in\{1,2,3,4,5\}$ that satisfy the given condition. Call $A_n, B_n, C_n, D_n$ the sets of $n-$tuples ending with $1, 2, 4, 5$ respectively and that satisfy the condition. Notice that number $3$ cannot appear in the sequence. The following statements hold: $\bullet\quad |A_n|=|D_n|$ and $|B_n|=|C_n|$: to each $(a_1,\dots, a_n)\in A_n$ corresponds a $n-$tuple $\left((6-a_1),\dots, (6-a_n)\right)\in D_n$. Similarly for $|B_n|$ and $|C_n|$. $\bullet\quad |B_n|=|C_n|=|A_{n-1}|$: cancelling the last number from $C_n$ we obtain a $(n-1)-$tuple ending with $1$. $\bullet\quad |A_n|=|C_{n-1}|+|D_{n-1}|=|A_{n-2}|+|A_{n-1}|$: apply the above (notice that $|A_n|=F_{n+1}$, Fibonacci number). So $x_n=|A_n|+|B_n|+|C_n|+|D_n|=4|A_{n-1}|+2|A_{n-2}|$ and it's easy to prove from this that $x_n=x_{n-1}+x_{n-2}$ with $x_2=6, x_3=10, x_4=16,\dots$ I stopped here because I figure that the closed form might be nasty..
15.02.2011 19:35
If your reasonong is correct, the values you get will be $x_n = 2F_{n+2}$, where $F_1,F_2, F_3,F_4,F_5,F_6\ldots$ are the Fibonacci numbers $1,1,2,3,5,8,\ldots$.