A019589 Number of nondecreasing sequences that are differences of two permutations of 1,2,...,n.
1, 1, 2, 5, 16, 59, 246, 1105, 5270, 26231, 135036, 713898, 3857113, 21220020, 118547774, 671074583
Offset: 0
References
- Olivier Gérard and Karol Penson, Set partitions, multiset permutations and bi-permutations, in preparation.
Links
- C. Bebeacua, T. Mansour, A. Postnikov and S. Severini, On the X-rays of permutations, arXiv:math/0506334 [math.CO], 2005.
- David A. Corneth, Nondecreasing sequences for a(n) where n = 0..8.
- J.-P. Davalan, Permutations et tomographie - X-rays.
- James D. Louck, Power of a determinant with two physical applications, Internat. J. Math. & Math. Sci., Vol. 22, No 4(1999) pp. 745-759 - S 0161-1712(99)22745-7
Programs
-
Maple
with(LinearAlgebra): f:=n->nops([coeffs(Permanent(Matrix(n, (i, j) -> a[i+j])))]): [seq(f(n), n=1..10)]; # Vaclav Kotesovec, Mar 29 2019
-
Mathematica
a[n_] := Table[b[i+j], {i, n}, {j, n}] // Permanent // Expand // Length; Array[a, 10, 0] (* Jean-François Alcover, May 29 2019, after Vaclav Kotesovec *)
-
PARI
a(n) = my(l=List(), v=[1..n]);for(i=0, n!-1, listput(l, vecsort(v-numtoperm(n,i)))); listsort(l, 1); #l
-
Python
import itertools def a019589(n): s = set() for p in itertools.permutations(range(n)): s.add(tuple(sorted([k - p[k] for k in range(n)]))) return len(s) print([a019589(n) for n in range(10)]) # Bert Dobbelaere, Jan 19 2019
Formula
Extensions
More terms from Olivier Gérard, Sep 18 2007
Two more terms from Vladeta Jovovic, Oct 04 2007
a(0)=1 prepended by Alois P. Heinz, Jul 24 2017
a(13)-a(14) from Bert Dobbelaere, Jan 19 2019
a(15) from Max Alekseyev, Jun 28 2023
Comments