Can somebody help me with the following logic-- how to do it

I need to print a page once every 25 transactions but -- which transaction it prints for should be random.

I mean it might print for 1 st transaction in the first 25 transactions and print for 35th transaction in the next 25 transactions(25-50)-- basically this should be random making sure that it is printing only once every 25 transactions starting from 1.

please help me with this.....