← 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=1n∑i=0k−1qi=1(1+q)(1+q+q2)⋯(1+q+⋯+qn−1)
Let S(n,q)=[n]q!. You are given S(5,2)=9765, S(100,7)mod1000000000039=850054509459.

Find S(123456789876,7)mod1000000000039.