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-4 of 4 results.

A003110 a(n) = number of special odd permutations of 2*n+1.

Original entry on oeis.org

0, 2, 2, 108, 2028, 32870, 1213110, 46493784, 2310521000, 137466038346, 9842687925450, 832295357128500
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of odd permutations, pi(0),...,pi(2*n), of 0,...,2*n such that pi(0) = 0 and p(k) = k + pi(k) (mod 2*n+1), k=0,...,2*n is also a permutation of 0,...,2*n. - Sean A. Irvine, Jan 31 2015

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003109 (special even permutations), A003110 (total).

Extensions

Name clarified and offset corrected by Sean A. Irvine, Jan 31 2015
a(8)-a(9) from Sean A. Irvine, Jan 31 2015
a(10)-a(12) from Vaclav Kotesovec, May 17 2019 (using the terms of A003111 and A003112)

A003109 a(n) = number of special even permutations of 2*n+1.

Original entry on oeis.org

1, 1, 17, 117, 1413, 46389, 1211085, 47977305, 2302999889, 137682614769, 9844042388505, 832087399629125
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of even permutations, pi(0),...,pi(2*n), of 0,...,2*n such that pi(0) = 0 and p(k) = k + pi(k) (mod 2*n+1), k=0,...,2*n is also a permutation of 0,...,2*n. - Sean A. Irvine, Jan 30 2015

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003110 (special odd permutations), A003111 (total).

Extensions

a(8)-a(9) from Sean A. Irvine, Jan 31 2015
a(10)-a(12) from Vaclav Kotesovec, May 17 2019 (using the terms of A003111 and A003112)

A147679 Triangle read by rows: T(n,k) (n >= 1, 0 <= k <= n-1) is the number of permutations of [0..(n-1)] of spread k.

Original entry on oeis.org

1, 1, 1, 0, 3, 3, 4, 8, 4, 8, 20, 25, 25, 25, 25, 144, 108, 108, 144, 108, 108, 630, 735, 735, 735, 735, 735, 735, 5696, 4608, 5248, 4608, 5696, 4608, 5248, 4608, 39366, 40824, 40824, 39285, 40824, 40824, 39285, 40824, 40824, 366400, 362000, 362000, 362000, 362000, 366400, 362000, 362000, 362000, 362000
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2009

Keywords

Comments

The reference gives more terms, formulas, connection with A003112, etc.
s(pi):= Sum_{j=0..n-1} j*pi(j) (mod j) is defined to be the spread of a permutation pi of [0..(n-1)].

Examples

			Triangle begins:
    1
    1   1
    0   3   3
    4   8   4   8
   20  25  25  25  25
  144 108 108 144 108 108
  ...
		

Crossrefs

Cf. A003112.
Row sums give: A000142.
Columns k=0-3 give: A004204, A004205, A004206, A004246.
Diagonal gives: A004205.

Programs

  • Maple
    b:= proc(n) option remember;
         local l, p, r;
         l:= array([i$i=0..n-1]);
         r:= array([0$i=1..n]);
         p:= proc(t,s)
          local d, h, j;
          if t=n then d:= ((s+(n-1)*l[n]) mod n) +1;
                      r[d]:= r[d]+1
          else for j from t to n do
                l[t],l[j]:= l[j],l[t];
                p(t+1, (s+(t-1)*l[t]) )
               od;
               h:= l[t];
               for j from t to n-1 do l[j]:= l[j+1] od;
               l[n]:= h
          fi
         end;
         p(1,0);
         eval(r)
        end:
    T:= (n,k)-> b(n)[k+1]:
    seq (seq (T(n,k), k=0..n-1), n=1..10);
  • Mathematica
    b[n_] := b[n] = Module[{l, p, r}, l = Range[0, n-1]; r = Array[0&, n]; p [t_, s_] := Module[{d, h, j}, If[t == n, d = Mod[s+(n-1)*l[[n]], n]+1; r[[d]] = r[[d]]+1, For[j = t, j <= n, j++, {l[[t]], l[[j]]} = {l[[j]], l[[t]]}; p[t+1, s+(t-1)*l[[t]]]]; h = l[[t]]; For[j = t, j <= n-1, j++, l[[j]] = l[[j+1]]]; l[[n]] = h]]; p[1, 0]; r]; t[n_, k_] := b[n][[k+1]]; Table [Print[t[n, k]]; t[n, k], {n, 1, 10}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Apr 17 2014, after Alois P. Heinz *)
  • Sage
    @CachedFunction
    def A147679_row(n):
        row = [0]*n
        for p in Permutations(range(n)):
            spread = sum(i*px for i,px in enumerate(p)) % n
            row[spread] += 1
        return row
    A147679 = lambda n,k: A147679_row(n)[k] # D. S. McNeil, Dec 23 2010

Extensions

Edited by Alois P. Heinz, Dec 22 2010

A346949 Value of the permanent of the matrix [1-zeta^{j-k}]_{1<=j,k<=2n}, where zeta is any primitive 2n-th root of unity.

Original entry on oeis.org

4, 48, 1440, 80640, 7257600, 958003200, 174356582400, 41845579776000, 12804747411456000, 4865804016353280000, 2248001455555215360000, 1240896803466478878720000, 806582922253211271168000000, 609776689223427721003008000000, 530505719624382117272616960000000, 526261673867387060334436024320000000
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 08 2021

Keywords

Comments

The author has proved that the exact value of a(n) is 2*(2n)!. Moreover, for any primitive n-th root zeta of unity, the permanent of the matrix [1-zeta^j*x_k]_{1<=j,k<=n} is n!(1-x_1..x_n).
Conjecture: Let zeta be a primitive 2n-th root of unity. Then the sum of those Product_{j=1..2n}(1-zeta^{j-f(j)})^{-1} with f over all the derangements of {1,...,2n} has the exact value ((2n-1)!!/2^n)^2.

Examples

			a(1) is the permanent of the matrix [1-(-1)^{1-1},1-(-1)^{1-2};1-(-1)^{2-1},1-(-1)^{2-2}] = [0,2;2,0], which equals 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]= Permanent[Table[1-E^(2*Pi*I*(j-k)/(2*n)),{j,1,2n},{k,1,2n}]];
    (* Though a(n) is actually an integer, Mathematica could not find its exact value for a general positive integer n. Instead, we may check approximate values of a(n) such as N[a[5],10] = 7257600.000. *)
  • PARI
    default(realprecision, 100); a(n) = round(real(matpermanent(matrix(2*n, 2*n, j, k, 1-exp(Pi*I*(j-k)/n))))) \\ Michel Marcus, Aug 08 2021

Formula

a(n) = 2*(2*n)!.

Extensions

a(16) from Vaclav Kotesovec, Aug 21 2021
Showing 1-4 of 4 results.