← RoseCode

ROSECODE 518

q-Factorial

liuguangxi · Math ·

For n a positive integer, the q-factorial is defined by [n]q!=k=1n[k]q=k=1ni=0k1qi=1(1+q)(1+q+q2)(1+q++qn1)
Let S(n,q)=[n]q!. You are given S(5,2)=9765, S(100,7)mod1000000000039=850054509459.

Find S(123456789876,7)mod1000000000039.