7.1. By direct calculation we get
a1a2a3a4a5a6a7a8a9a10a11≡1(mod11)≡3(mod11)≡9(mod11)≡0(mod11)≡10(mod11)≡4(mod11)≡6(mod11)≡0(mod11)≡1(mod11)≡0(mod11)≡0(mod11)
So from the relation in the problem we obtain that for every n≥10 we have an+2≡0(mod11). The answer is:
n∈{4,8}∪{n∈N:n≥10}
Alternate solution. From the recurrence relation in the problem we immediately see that for n≥3 we have
an−an−1=n(an−1−an−2)an−1−an−2=(n−1)(an−2−an−3)⋮a4−a3=4(a3−a2)a3−a2=(a2−a1)
After consecutive substitutions we arrive to:
an−an−1=3⋅4…⋅n⋅(a2−a1)=n!
i.e.
an=an−1+n!
and therefore
an=1!+2!+3!+⋯+n!
Now we have
a1=1a2=3a3=9≡−2a4≡−2+2⋅3⋅4=0a5≡2⋅3⋅4⋅5≡−1a6≡−1(−1)⋅6≡−7≡4
and in a similar way a7≡6,a8≡0,a9≡1,a10≡0. All congruences are modulo 11. As for n≥11 we have n!≡0, from (1) it follows that then an≡0, as well as for n=4,8.