A056855 a(n) = (Product k) * (Sum 1/k), where both the product and the sum are over those positive integers k, where k <= n and gcd(k,n) = 1.
1, 1, 3, 4, 50, 6, 1764, 176, 4968, 300, 10628640, 552, 1486442880, 34986, 2024400, 4098240, 70734282393600, 133542, 22376988058521600, 16294800, 121402713600, 2612325870, 4148476779335454720000, 61931424, 138951136600657920000, 1330269185700
Offset: 1
Examples
a(8) = 1*3*5*7*(1 + 1/3 + 1/5 + 1/7) = 176 because 1, 3, 5 and 7 are the positive integers <= 8 that are relatively prime to 8.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..450
Programs
-
Maple
a:= n-> (l-> mul(i, i=l)*add(1/i, i=l))( select(x-> igcd(x, n)=1, [$1..n])): seq(a(n), n=1..40); # Alois P. Heinz, May 22 2015
-
Mathematica
f[n_] := Block[{k = Select[Range[n], GCD[ #, n] == 1 &]}, Plus @@ (Times @@ k*Plus @@ 1/k)]; Table[ f[n], {n, 25}] (* Robert G. Wilson v, Nov 16 2004 *)
Formula
Sum_{1<=m<=n, gcd(m,n)=1} 1/m = (1/n)*Sum_{k|n} mu(n/k)*k*H(k), where H(k) = Sum_{j=1..k} 1/j. - Leroy Quet, Nov 13 2004
Comments