← RoseCode

ROSECODE 397

Factorial divisibility

Philippe_57721 · Programming ·

Let S(n) be the smallest integer such as n divides S(n)!.

For instance S(9)=6 for 6!0 mod 9

Consider the set A of numbers of form 2e1×3e2×5e3×7e4×11e5×13e6×17e7×19e8

What is nAS(n) where A contains the first 108 elements of A

You are given : 45499522 when A contains the first 106 elements of A

[My timing : 120 sec]

P.S1: We consider S(1) = 0
P.S2: There is a solution in less than 15 sec.