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.

Showing 1-2 of 2 results.

A226388 Number of n-permutations such that all cycle lengths have a common divisor >= 2.

Original entry on oeis.org

0, 0, 1, 2, 9, 24, 265, 720, 11025, 62720, 965601, 3628800, 130478425, 479001600, 19151042625, 191132125184, 4108830350625, 20922789888000, 1448301616386625, 6402373705728000, 466136852576275881, 5675242696048640000, 193688172394325870625, 1124000727777607680000
Offset: 0

Views

Author

Geoffrey Critzer, Jun 05 2013

Keywords

Comments

a(p) = (p-1)! for p a prime.

Examples

			a(6) = 265 counting permutations with cycle types: 6; 4-2; 3-3; 2-2-2; of which there are 120 + 90 + 40 + 15 = 265.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, g) option remember; `if`(n=0, `if`(g>1, 1, 0),
          `if`(i<2, 0, b(n, i-1, g) +`if`(igcd(g, i)<2, 0,
           add((i-1)!^j/j! *multinomial(n, i$j, n-i*j)*
             b(n-i*j, i-1, igcd(i, g)), j=1..n/i))))
        end:
    a:= n-> b(n, n, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jun 06 2013
    # second Maple program:
    b:= proc(n, g) option remember; `if`(n=0, `if`(g>1, 1, 0), 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..30);  # Alois P. Heinz, Jul 04 2021
  • Mathematica
    f[list_] :=
    Total[list]!/Apply[Times, Table[list[[i]], {i, 1, Length[list]}]]/
      Apply[Times,
       Select[Table[
          Count[list, i], {i, 1, Total[list]}], # > 0 &]!]; Table[
    Total[Map[f, Select[Partitions[n], Apply[GCD, #] > 1 &]]], {n, 0,
      25}]

Formula

a(n) = n! - A079128(n) for n >= 1. - Alois P. Heinz, Jul 04 2021

A335797 a(n) = n! * [x^n] exp(Sum_{k=1..n, gcd(n,k) = 1} x^k / k!).

Original entry on oeis.org

1, 1, 1, 4, 5, 51, 7, 876, 457, 7678, 5271, 678569, 10705, 27644436, 5060161, 133924576, 197920145, 82864869803, 173283535, 5832742205056, 98269310261, 34660429169122, 25313714237505, 44152005855084345, 13685698802401, 2410161938206898126, 129066382491033573
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 12 2020

Keywords

Comments

Number of set partitions of [n] into blocks that are relatively prime to n.

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1, add(`if`(
          igcd(j, m)=1, b(n-j, m), 0)*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..27);  # Alois P. Heinz, Oct 12 2020
  • Mathematica
    Table[n! SeriesCoefficient[Exp[Sum[Boole[GCD[n, k] == 1] x^k/k!, {k, 1, n}]], {x, 0, n}], {n, 0, 26}]
Showing 1-2 of 2 results.