Let $A$ and $B$ be subsets of the set $\Bbb Z$ for all integers, and let $\mathscr F$ denote the set of all functions $f:A\rightarrow B.$ Assume $A = \{1,2,3\}$ and $B=\{1,2,...,n\}$ where $n\ge 2$ is a fixed integer. 

Define a relation $R$ on $\mathscr F$ by : for any $f,g \in \mathscr F$, $\;fRg\;$ if and only if $f - g$ is a constant function (i.e. there is a constant $c$ so that $f(x) - g(x) =c$ for all $x\in A$).

(b) Find the number of functions $f \in \mathscr F$ so that $[f]= \{f\}$

So this means I need to find the number of functions so that $1$ and $n$ are in the range. So for example $f = \{(1,n),(2,1),(3,n-2$ choices$)\}$, so I have 1 choice for the first 2 and n-2 choices for the third. So $1 \times 1 \times (n-2) = n$ functions. But I have to consider the permutations too so it would be $3! \times n$ But this would be true if the functions were one-to-one. What if they are not? 

(c) Find the number of distinct equivalence classes $[f]$ of $R$.

For this one I need to find the number of functions so that $1$ is in the range right? so functions that have $f(x)=1$. For example $f = \{(1,1),(2,n$ choices$),(n$ choices$)\}$ and taking the permutations into consideration it would be $3! \times n^2$?