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.

A346066 Sum of GCD of cycle lengths over all permutations of [n].

Original entry on oeis.org

0, 1, 3, 10, 45, 216, 1505, 9360, 84105, 730240, 7715169, 76204800, 1090114025, 11975040000, 185501455425, 2791872219136, 45361870178625, 690452066304000, 14415096609538625, 236887827111936000, 5448878874163974249, 108418310412206080000, 2381309423564793710625
Offset: 0

Views

Author

Alois P. Heinz, Jul 03 2021

Keywords

Examples

			a(3) = 10 = 3+3+1+1+1+1: (123), (132), (1)(23), (13)(2), (12)(3), (1)(2)(3).
		

Crossrefs

Cf. A060014 (the same for LCM), A346085.

Programs

  • Maple
    b:= proc(n, g) option remember; `if`(n=0, g, add((j-1)!
          *b(n-j, igcd(g, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..24);
  • Mathematica
    b[n_, g_] := b[n, g] = If[n == 0, g, Sum[(j - 1)!*
         b[n - j, GCD[g, j]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Mar 06 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} k * A346085(n,k).