import sys

read = sys.stdin.buffer.read



from fractions import gcd



N,*A = list(map(int,read().split()))



lcm = 1

answer = 0

for x in A:

  n = x//gcd(lcm,x)

  lcm *= n

  answer *= n

  answer += lcm//x

  

answer %= (10**9 + 7)

print(answer)

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



from fractions import gcd

from functools import reduce



N,*A = list(map(int,read().split()))



MOD = 10 ** 9 + 7



lcm = reduce(lambda x,y: y//gcd(x,y)*x, A)

lcm %= MOD



coef = sum(pow(x, MOD-2, MOD) for x in A)

answer = lcm * coef % MOD



print(answer)
import sys

read = sys.stdin.buffer.read
from fractions import gcd

N, *A = list(map(int, read().split()))
lcm = 1
answer = 0
for x in A:
    n = x // gcd(lcm, x)
    lcm *= n
    answer *= n
    answer += lcm // x
answer %= 10**9 + 7
print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from fractions import gcd
from functools import reduce

N, *A = list(map(int, read().split()))
MOD = 10**9 + 7
lcm = reduce(lambda x, y: y // gcd(x, y) * x, A)
lcm %= MOD
coef = sum(pow(x, MOD - 2, MOD) for x in A)
answer = lcm * coef % MOD
print(answer)

+readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines +from functools import reduce -lcm = 1 -answer = 0 -for x in A: -    n = x // gcd(lcm, x) -    lcm *= n -    answer *= n -    answer += lcm // x -answer %= 10**9 + 7 +MOD = 10**9 + 7 +lcm = reduce(lambda x, y: y // gcd(x, y) * x, A) +lcm %= MOD +coef = sum(pow(x, MOD - 2, MOD) for x in A) +answer = lcm * coef % MOD