Problem 446: Retractions B

FCC link

For every integer n>1, the family of functions fn,a,b is defined

by fn,a,b(x)≡ax+b mod n for a,b,x integer and 0

F(N)=∑R(n4+4) for 1≤n≤N. F(1024)=77532377300600.

Find F(107) (mod 1 000 000 007)

Test

{{test}}

Console output