I tested these calculations
n = 773160767 n*(n+1) n*(n+1)/2 n*(n+1)//2 n*(n+1)/2 % (10**9+7) n*(n+1)//2 % (10**9+7)
Output: