OFFSET
1,3
FORMULA
a(1) = 1; a(n+1) = Sum_{k=1..n} a(k)/gcd(a(k),n).
EXAMPLE
a(1) = 1;
a(2) = lcm(a(1),1)/1 = lcm(1,1)/1 = 1;
a(3) = lcm(a(1),2)/2 + lcm(a(2),2)/2 = lcm(1,2)/2 + lcm(1,2)/2 = 2;
a(4) = lcm(a(1),3)/3 + lcm(a(2),3)/3 + lcm(a(3),3)/3 = lcm(1,3)/3 + lcm(1,3)/3 + lcm(2,3)/3 = 4, etc.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Sum[LCM[a[k - 1], n - 1]/(n - 1), {k, 2, n}]; Table[a[n], {n, 42}]
a[1] = 1; a[n_] := a[n] = Sum[a[k - 1]/GCD[a[k - 1], n - 1], {k, 2, n}]; Table[a[n], {n, 42}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 14 2017
STATUS
approved