%I #20 Apr 05 2020 16:53:16
%S 1,1,2,2,9,15,104,96,285,565,6214,37282,484665,6785309,101779634,
%T 814237070,13842030189,83052181131,1577991441488,7889957207436,
%U 55229700452049,1215053409945077,27946228428736770,111784913714947074,2794622842873676849,72660193914715598073
%N a(n) = lcm(a(n-1), n) - gcd(a(n-1), n) where a(1) = 1.
%C The sequence seems to grow between exponentially and factorially but that's just a suspicion.
%H Alois P. Heinz, <a href="/A309705/b309705.txt">Table of n, a(n) for n = 1..500</a>
%F a(n) = lcm(a(n-1), n) - gcd(a(n-1), n) for n > 1.
%e For n = 5, since a(4) = 2, a(5) = lcm(5,2) - gcd(5,2) = 10 - 1 = 9.
%p a:= proc(n) option remember; `if`(n=1, 1,
%p ilcm(a(n-1), n)-igcd(a(n-1), n))
%p end:
%p seq(a(n), n=1..29); # _Alois P. Heinz_, Sep 17 2019
%t a[1] = 1; a[n_] := a[n] = LCM[a[n - 1], n] - GCD[a[n - 1], n]; Array[a, 26] (* _Amiram Eldar_, Sep 17 2019 *)
%t nxt[{n_,a_}]:={n+1,LCM[a,n+1]-GCD[a,n+1]}; NestList[nxt,{1,1},30][[All,2]] (* _Harvey P. Dale_, Apr 05 2020 *)
%o (Python)
%o def lcmMinusGcd(n):
%o retlist = [1]
%o for i in range(1, n):
%o g = gcd(retlist[i-1], i+1)
%o retlist.append( floor(retlist[i-1]*(i+1) / g) - g)
%o return ', '.join(map(str,retlist))
%o (PARI) seq(n)={my(v=vector(n)); v[1]=1; for(n=2, #v, v[n] = lcm(v[n-1], n) - gcd(v[n-1], n)); v} \\ _Andrew Howroyd_, Aug 28 2019
%Y Cf. A008339, A077139, A129090.
%K nonn
%O 1,3
%A _Atticus Cull_, Aug 13 2019