Răspuns :
[tex]a = 1\cdot 2\cdot 2^2\cdot 2^3\cdot ...\cdot 2^5+795\\=1\cdot 2\cdot 2^2\cdot (2^3\cdot 2^5)\cdot 2^4+795\\ = 1\cdot 2\cdot 2^2\cdot 256\cdot 2^4 +768+27\\ =1\cdot 2\cdot 2^2\cdot M_{256}\cdot 2^4+3\cdot 256+27\\ = 1\cdot 2\cdot 2^2\cdot M_{256}\cdot 2^4+M_{256}+27\\ = M_{256}+M_{256}+27\\ = M_{256}+27\\ \\ \Rightarrow \text{Restul impartirii lui }a\text{ la 256 este 27.}[/tex]
A) caz 1: n mai mare sau egal ca 7
a=1×2×3×4×5×6×7×.... + 73=(6×7)×ceva+73, unde ceva=1×2×3×4×8×..., adica nu contine 6 si 7
Deci
a=42×ceva+73
Acum a/42=(42×ceva+73)/42=ceva+73/42.
Prin urmare, restul lui a la impartirea cu 42 este restul lui 73/42, adica 31
Caz 2: n mai mic ca 7. Alege un n. Fa calculul lui a si vezi cit iti da. Apoi imparti la 42 si gaesti restul.
Ex: n=2: a=1×2+73=2+73=75
Rest (a/42)=rest(75/42)=33
B) 256=2⁸
a=1×2×2²×2³×2⁴×2⁵+795= (2³×2⁵)×2×2⁴×2²+795
a/256=2×2²×2⁴+795/256
Restul este dat de 795/256=3 rest 27
Adica restul este 27.