Respuesta :

Let [tex]u(n)[/tex] be the units digits of the number [tex]n[/tex].

Clearly, [tex]u(7)=7[/tex].

Since [tex]7^2=49[/tex], we have [tex]u(7^2)=9[/tex].

Next, [tex]7^3=7(49)=7(40+9)[/tex], so only the product [tex]7\times9[/tex] will contribute to the value of [tex]u(7^3)[/tex]; indeed, [tex]7\times9=63[/tex], so [tex]u(7^3)=3[/tex].

Next, [tex]7^4=7(280+63)=7(340+3)[/tex], and [tex]7\times3=21[/tex], so by the same reasoning as before we have [tex]u(7^4)=1[/tex].

Continuing in this pattern, we find that

[tex]u(7^5)=7[/tex]
[tex]u(7^6)=9[/tex]
[tex]u(7^7)=3[/tex]
[tex]u(7^8)=1[/tex]
[tex]u(7^9)=7[/tex]

and so on, with the repeating pattern of [tex]u(7^n)=\{7,9,3,1,7,9,3,1,\ldots\}[/tex] with a period of 4. This means that [tex]u(7^n)=u(7^m)[/tex], where [tex]7^n\equiv m\mod4[/tex].

Now, [tex]349=348+1=4\times87+1[/tex], i.e. [tex]349\equiv1\mod4[/tex], so

[tex]u(7^{349})=u(7^1)=7[/tex]