What is the remainder of N=1×3×5×7×...×101 when it is divided by 8?
So
N≡x(mod8)1×3×5×7×…×101≡x(mod8)
1≡1(mod8)3≡3(mod8)5≡5(mod8)7≡7(mod8)9≡1(mod8)11≡3(mod8)13≡5(mod8)15≡7(mod8)17≡1(mod8)19≡3(mod8)21≡5(mod8)23≡7(mod8)25≡1(mod8)27≡3(mod8)29≡5(mod8)31≡7(mod8)⋮⋮⋮⋮89≡1(mod8)91≡3(mod8)93≡5(mod8)95≡7(mod8)87≡1(mod8)99≡3(mod8)101≡5(mod8)
(1×3×5×7)×(9×11×13×15)×(17×19×21×23)×…×(89×91×93×95)×(97×99×101)≡x(mod8)(1×3×5×7)×(1×3×5×7)×(1×3×5×7)×…×(1×3×5×7)×(1×3×5)≡x(mod8)(1×3×5×7)=105≡1(mod8)(1×3×5)=15≡7(mod8)(1)×(1)×(1)×…×(1)×(7)≡7(mod8)
The remainder of N=1×3×5×7×⋯×101 when it is divided by 8 is 7