Find the number of functions $4f^3(x)=13f(x)+6$ 
$f(x)$ is a function satisfying
$$4f^3(x)=13f(x)+6$$
$\forall\ x\in [-3,3]$ and is discontinuous only and only at all integers in $[-3,3]$. If $N$ denotes the unit digit of the number of all such functions, find $N$.
Answer: $6$.

Solving the cubic for $f(x)$ gives us
$$f(x)=-\frac{3}{2},-\frac{1}{2}\ \text{or}\ 2$$
Then I figured, for $f$ to be discontinuous at integers, we must define it piecewise(i.e casewise) on the integers, with the value of the function changing at integers.
Something like$f(x)=$
$$
\begin{cases}
 -0.5 & -3\leq x<-2 \\
 -1.5 & -2\leq x<-1 \\
 -0.5 & -1\leq x<0 \\
    2 &  0\leq x<1 \\
 -1.5 &  1\leq x<2 \\
 2 &  2\leq x<3 \\
 -1.5 &  x=3\\
\end{cases}
$$
So I thought, this problem is equivalent to filling $7$ blanks with $3$ distinct objects, and no two adjacent blanks contain the same object.
Hence, the first blank can be filled in $3$ ways, the second in $2$ ways, the third in $2$ ways and so on, until the seventh blank in $2$ ways.
So the number of ways is $$3\times2\times2\times2\times2\times2\times2=192$$
whose unit digit is not $6$.

Could anyone tell me where I went wrong?

Thanks in advance!

The following are the properties that fully characterize your function $f$:

*

*For every $x$, $f(x)\in \{2,-1/2,-3/2\}$

*$f$ must be constant on every open interval $(n,n+1)$ for $n=-3,-2,-1,0,1,2$

*among $f(n-1,n)$, $f(n)$, $f(n,n+1)$ there must be at least two different values for $n=-2,-1,0,1,2$

*$f(3) \ne f(2,3)$, $f(-3)\ne f(-3,-2)$
As you did, you can start by fixing $f(-3)$ and $f(-3,-2)$ in 6 ways. Then you can fix $f(-2)$ and $f(-2,-1)$ in $6 + 2 =8$ ways. The same 8 ways for $f(-1)$ and $f(-1,0)$, etc.
The last choice is $f(3)$ that can be made in 2 ways.
For a total of $6\times 8^5\times 2$ ways. Since $2^5\equiv 2\pmod{10}$, we have $6\times 8^5\times 2 = 3 \times 2^{17}\equiv 3 \times 2^{5} \equiv  6\pmod {10}$
