Mod[16^9,257]

16

Mod[5,3]

2

?Mod

Mod[m, n] gives the remainder on division of m by n. The result has
   the same sign as n.

m={{1,1,1,1},{1,16,256,241},{1,256,1,256},{1,241,256,16}}

{{1, 1, 1, 1}, {1, 16, 256, 241}, {1, 256, 1, 256}, 
 
  {1, 241, 256, 16}}

v={13,48,0,0}

{13, 48, 0, 0}

p=m.v

{61, 781, 12301, 11581}

Mod[204*16,257]

180


Converted by Mathematica  (July 7, 2003)