← RoseCode

ROSECODE 337

Multiplicative Order

Philippe_57721 · Programming ·

The multiplicative order o(g,p) of a number g modulo p, (g and p coprime), is the smallest integer k such as:
gk=1 modulo p


For instance, o(10,73)=8

For how many prime numbers p <4×108 the multiplicative order o(10,p)<100?

Answer format: count,sum

Example: 55,11573 for a limit of 1000

[My timing: 70 sec]