cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Aug 30 2000

Keywords

Comments

Since Sum_{k|n} k * Sum_{1<=m<=k, gcd(m,k)=1} 1/m = n*H(n), Sum_{k>=1} (Sum_{1<=m<=k, gcd(m,k)=1} 1/m) /k^2 = 2. - Leroy Quet, Nov 13 2004

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.
		

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