local mce, mfl, msq, mmi, mma, mab = math.ceil, math.floor, math.sqrt, math.min, math.max, math.abs
local mod = 1000000007

local function bmul(x, y)
  local x0, y0 = x % 31623, y % 31623
  local x1, y1 = mfl(x / 31623), mfl(y / 31623)
  return (x1 * y1 * 14122 + (x1 * y0 + x0 * y1) * 31623 + x0 * y0) % mod
end
local function badd(x, y)
  return (x + y) % mod
end

local function bsub(x, y)
  return x < y and x - y + mod or x - y
end

local function modpow(src, pow)
  local res = 1
  while 0 < pow do
    if pow % 2 == 1 then
      res = bmul(res, src)
      pow = pow - 1
    end
    src = bmul(src, src)
    pow = mfl(pow / 2)
  end
  return res
end

local function modinv(src)
  return modpow(src, mod - 2)
end

local function getprimes(x)
  local primes = {}
  local allnums = {}
  for i = 1, x do allnums[i] = true end
  for i = 2, x do
    if allnums[i] then
      table.insert(primes, i)
      local lim = mfl(x / i)
      for j = 2, lim do
        allnums[j * i] = false
      end
    end
  end
  return primes
end

local function getdivisorparts(x, primes)
  local prime_num = #primes
  local tmp = {}
  local lim = mce(msq(x))
  local primepos = 1
  local dv = primes[primepos]
  while(primepos <= prime_num and dv <= lim) do
    if(x % dv == 0) then
      local asdf = {}
      asdf.p = dv
      asdf.cnt = 1
      x = x / dv
      while(x % dv == 0) do
        x = x / dv
        asdf.cnt = asdf.cnt + 1
      end
      table.insert(tmp, asdf)
      lim = mce(msq(x))
    end
    if(primepos == prime_num) then break end
    primepos = primepos + 1
    dv = primes[primepos]
  end
  if(x ~= 1) then
    local asdf = {}
    asdf.p, asdf.cnt = x, 1
    table.insert(tmp, asdf)
  end
  return tmp
end


local n = io.read("*n")
local a = {}
for i = 1, n do
  a[i] = io.read("*n")
end
local primes = getprimes(1000)
local alldvs = {}
local dvs = {}
for i = 1, n do
  dvs[i] = getdivisorparts(a[i], primes)
  for j = 1, #dvs[i] do
    local p, c = dvs[i][j].p, dvs[i][j].cnt
    if not alldvs[p] then
      alldvs[p] = c
    else
      alldvs[p] = mma(alldvs[p], c)
    end
  end
end
local ret = 0
local mul = 1
for p, c in pairs(alldvs) do
  mul = bmul(mul, modpow(p, c))
end
for i = 1, n do
  local z = 1
  for j = 1, #dvs[i] do
    local p, c = dvs[i][j].p, dvs[i][j].cnt
    z = bmul(z, modpow(p, c))
  end
  ret = badd(ret, bmul(mul, modinv(z)))
end
print(ret)
