[tex]f:N \rightarrow N, f(n)= \text{restul impartirii numarului n la 5.} \\
a) \\
0 : 5=0~rest~0~~\Longrightarrow~~f(0)=0 \\
2 : 5=0~rest~2~~\Longrightarrow~~f(2)=2 \\
3 : 5=0~rest~3~~\Longrightarrow~~f(3)=3 \\
5 : 5=1~rest~0~~\Longrightarrow~~f(5)=0 \\
7 : 5=1~rest~2~~\Longrightarrow~~f(7)=2 \\ \\
[/tex]
[tex]b) \\
n=5k+r ~~~~~unde~~k \in N;~~~r \in \{0;~1;~2;~3;~4\} \\
n+5=5k+r+5 =5(k+1) + r~~~~unde~~k \in N;~~~r \in \{0;~1;~2;~3;~4\} \\ \\
n : 5 = (5k+r):5 =k ~rest~r~~\Longrightarrow~~f(n)=r \\
(n+5) : 5 = [5(k+1) + r]:5 = (k+1) ~rest~r~~\Longrightarrow~~f(n+5)=r \\
\Longrightarrow~~\boxed{f(n)=f(n+5)} ~~~\text{pentru orice } ~n \in N \\
cctd[/tex]