OFFSET
1,2
COMMENTS
LINKS
Walt Rorie-Baety, Table of n, a(n) for n = 1..1000
Project Euler, Problem 379: Least common multiple count
FORMULA
a(n) = Sum_{k=1..n} (d(k^2)+1)/2, where d is the number of divisors function (A000005). - Charles R Greathouse IV, Apr 10 2012
a(n) = Sum_{k=1..n} A007875(k) * floor(n/k). - Daniel Suteu, Jan 08 2021
EXAMPLE
a(1000000) = 37429395, according to Project Euler problem #379.
MATHEMATICA
PROG
(Haskell) a n = length [(x, y)| x <- [1..n], y <- [x..n], lcm x y <= n]
(PARI) a(n)=(sum(k=1, n, numdiv(k^2))+n)/2 \\ Charles R Greathouse IV, Apr 10 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Walt Rorie-Baety, Apr 10 2012
STATUS
approved