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.

Previous Showing 11-13 of 13 results.

A088042 Number of permutations in the symmetric group S_n such that the size of their conjugacy class is odd.

Original entry on oeis.org

1, 2, 4, 4, 16, 76, 232, 106, 946, 5716, 27776, 63856, 272416, 2390480, 10349536, 2027026, 34459426, 344594404, 2618916472, 10475679736, 54997260256, 568305978472, 3132225435824, 1807129471456, 12047128545376, 175289251587776, 1326384554695552
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Nov 02 2003

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n!*add((binomial(n-(n mod 2), 2*k) mod 2)/((n-2*k)!*k!*2^k),
            k=0..floor(n/2)):
    seq(a(n), n=1..30);  # Alois P. Heinz, May 01 2013
  • Mathematica
    a[n_] := n!*Sum[Mod[Binomial[n-Mod[n, 2], 2*k], 2]/((n-2*k)!*k!*2^k), {k, 0, Floor[n/2]}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..floor(n/2)} n!/(n-2*k)!/k!/2^k*(C(n-(n mod 2), 2*k) mod 2). - Vladeta Jovovic, Nov 06 2003

Extensions

More terms from Vladeta Jovovic, Nov 03 2003

A088335 Number of permutations in the symmetric group S_n such that the size of their centralizer is even.

Original entry on oeis.org

0, 0, 2, 4, 16, 96, 576, 4320, 31872, 298368, 3052800, 34387200, 404029440, 5339473920, 75893207040, 1139356108800, 18079668633600, 310896849715200, 5654417758617600, 107707364764876800, 2145784566959308800, 45252164164799692800, 1003024255355781120000
Offset: 0

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Nov 07 2003

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(((i+1)/2)^2n, 0, (i-1)!*
           b(n-i, i-2)*binomial(n, i))))
        end:
    a:= n-> n!-b(n, n-1+irem(n, 2)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 27 2020
  • Mathematica
    b[n_, i_] := b[n, i] = If[((i + 1)/2)^2 < n, 0, If[n == 0, 1, b[n, i - 2] + If[i > n, 0, (i - 1)! b[n - i, i - 2] Binomial[n, i]]]];
    a[n_] := n! - b[n, n - 1 + Mod[n, 2]];
    a /@ Range[0, 30] (* Jean-François Alcover, Apr 08 2020, after Alois P. Heinz *)
  • PARI
    seq(n)={Vec(serlaplace(1/(1-x) - prod(k=1, n, 1+(k%2)*x^k/k + O(x*x^n))), -(n+1))} \\ Andrew Howroyd, Jan 27 2020

Formula

a(n) = n! - A088994(n).

Extensions

a(0)=0 prepended and terms a(11) and beyond from Andrew Howroyd, Jan 27 2020

A368867 Number of labeled mappings from n points to themselves with unique square root (endofunctions).

Original entry on oeis.org

1, 1, 2, 2, 56, 544, 5064, 69348, 1210320
Offset: 0

Views

Author

Keith J. Bauer, Jan 08 2024

Keywords

Comments

A mapping f has a unique square root if there exists a unique g such that gg = f.

Examples

			For n = 3, the two 3-cycles are unique square roots of each other.
Note that the identity map has more than one square root (i.e., 1->2, 2->1, 3->3 and itself).
Another non-example: 1->1, 2->2, 3->1 has two square roots: itself and 1->2, 2->1, 3->2.
In fact, the only endofunctions on {1,2,3} with unique square roots are the two 3-cycles, so a(3) = 2.
		

Crossrefs

A088994 (permutations only) < This sequence < A102687 (any square maps) < A000312 (all maps).

Programs

  • Lua
    function increment(size, t)
      t[1] = t[1] + 1
      local index = 1
      while t[index] > size do
        t[index] = 1
        index = index + 1
        if index > size then return true end
        t[index] = t[index] + 1
      end
      return false
    end
    function get_initial(size)
      local return_value = {}
      for i = 1, size do return_value[i] = 1 end
      return return_value
    end
    function compute(size)
      candidate = get_initial(size)
      return_value = 0
      repeat
        fun_root = get_initial(size)
        fun_root_count = 0
        repeat
          for i = 1, size do
            if candidate[i] ~= fun_root[fun_root[i]] then
              goto next_fun_root
            end
          end
          fun_root_count = fun_root_count + 1
          if (fun_root_count == 2) then break end
          ::next_fun_root::
        until (increment(size, fun_root))
        if (fun_root_count == 1) then
          return_value = return_value + 1
        end
      until (increment(size, candidate))
      return return_value
    end

Extensions

a(7)-a(8) from Andrew Howroyd, Jan 09 2024
Previous Showing 11-13 of 13 results.