login
a(n) = (1/1 - 1/2 + ... + (-1)^(n-1)/n)*lcm{1..n}.
4

%I #18 Apr 01 2018 20:48:12

%S 1,1,5,7,47,37,319,533,1879,1627,20417,18107,263111,237371,261395,

%T 477745,8842385,8161705,167324635,155685007,166770367,156188887,

%U 3825136961,3602044091,19081066231,18051406831,57128792093,54260455193,1653866633797

%N a(n) = (1/1 - 1/2 + ... + (-1)^(n-1)/n)*lcm{1..n}.

%H Reinhard Zumkeller, <a href="/A025530/b025530.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%t nn=30;With[{fr=Accumulate[Table[1/(n (-1)^(n-1)),{n,nn}]]}, Table[fr[[n]] LCM@@ Range[n],{n,nn}]] (* _Harvey P. Dale_, Dec 27 2012 *)

%o (Haskell)

%o a025530 n = sum $ map (div (a003418 $ fromInteger n))

%o (zipWith (*) [1..n] a033999_list)

%o -- _Reinhard Zumkeller_, Dec 23 2011

%o (PARI) a(n)=my(v=primes(primepi(n)),k=sqrtint(n),L=log(n+.5),t);t=prod(i=1,#v,if(v[i]>k,v[i],v[i]^(L\log(v[i]))));-sum(i=1,n,(-1)^i*t/i) \\ _Charles R Greathouse IV_, Dec 23 2011

%o (PARI) s=1;v=vector(10^4,i,1);for(n=2,#v,t=n/gcd(s,n);s*=t;v[n]=v[n-1]*t-(-1)^n*s/n);v \\ _Charles R Greathouse IV_, Dec 23 2011

%Y Cf. A058312, A058313, A003418, A033999.

%K nonn,easy,nice

%O 1,3

%A _Clark Kimberling_