Tag Info

Hot answers tagged

3

my stab at it, unfortunately only a marginal improvement in time: ii=13; Clear[a, b]; b = FoldList[Times, 1, Table[ Exp[MangoldtLambda[n]], {n, 2, ii}]]; a = Prepend[Table[ Limit[ Zeta[s] Total[Exp[Divisors[n]]^(s - 1) MoebiusMu[Divisors[n]]], s -> 1], {n, 2, ii}], 1] ; Monitor[aa = Prepend[Table[ ...


2

I realized now that I included unnecessary many terms of the Dirichlet inverse of the Euler totient. Therefore a better program is: ii = 13 aa = Range[ii]*0; Monitor[Do[ Clear[A, a, b, n, k]; b = Table[Product[Exp[MangoldtLambda[n]], {n, 1, k}], {k, 1, nn}]; a = Table[ If[n == 1, 1, Limit[Zeta[s] Total[ Exp[Divisors[n]]^(s - ...


1

OK, now let me make use of the experience got from this answer. With the help of CompilationTarget -> "C" and RuntimeOptions -> "Speed" (both are indispensable), the Table approach turns out to be the most elegant and fast and universal. The 1D case: n = 10^6; a = RandomReal[1, n]; pxz = Compile[{{n, _Integer}, {a, _Real, 1}}, Table[If[n/4 + 1 ...



Only top voted, non community-wiki answers of a minimum length are eligible