A347597
a(n) = Permanent(T(2*n + 1)) where T(n) is the tangent matrix defined in A346831. Bisection of A347598 (odd indices).
Original entry on oeis.org
0, 2, -12, 230, -6936, 316682, -20359332, 1754340590, -195242324016, 27266796955922, -4669829301365052, 962523286888757750, -235056895264868039496, 67119429827860669710362
Offset: 0
A347601
a(n) is the number of positive Euler permutations of order n.
Original entry on oeis.org
1, 0, 0, 2, 7, 16, 102, 1042, 8109, 63280, 642220, 7500626, 89458803, 1135216800, 15935870034, 241410428162, 3858227881945, 65327424977824, 1176448390679256, 22388999178300514, 447692501190569823, 9395318712874789744, 206713705368363820990, 4755693997171333347506
Offset: 0
Illustrating the decomposition of the rencontres numbers and the Euler numbers:
The third column is the sum of the first two columns and the fourth column is the difference between the first two. The fourth column is the sum of the last two.
[n] A347601 A347602 A000166 A347598 A122045 A347597
--------------------------------------------------------------------------
[ 0] 1, 0, 1, 1, 1, [0]
[ 1] 0, 0, 0, 0, 0, 0,
[ 2] 0, 1, 1, -1, -1, [0]
[ 3] 2, 0, 2, 2, 0, 2,
[ 4] 7, 2, 9, 5, 5, [0]
[ 5] 16, 28, 44, -12, 0, -12,
[ 6] 102, 163, 265, -61, -61, [0]
[ 7] 1042, 812, 1854, 230, 0, 230,
[ 8] 8109, 6724, 14833, 1385, 1385, [0]
[ 9] 63280, 70216, 133496, -6936, 0, -6936,
[10] 642220, 692741, 1334961, -50521, -50521, [0].
-
using Combinatorics
function TangentMatrix(N)
M = zeros(Int, N, N)
H = div(N + 1, 2)
for n in 1:N - 1
for k in 0:n - 1
M[n - k, k + 1] = n < H ? 1 : -1
M[N - n + k + 1, N - k] = n < N - H ? -1 : 1
end
end
M end
function EulerPermutations(n, sgn)
M = TangentMatrix(n)
S = 0
for p in permutations(1:n)
sgn == prod(M[k, p[k]] for k in 1:n) && (S += 1)
end
S end
PositiveEulerPermutations(n) = EulerPermutations(n, 1)
-
# Uses function TangentMatrix from A346831.
EulerPermutations := proc(n, sgn) local M, P, N, s, p, m;
M := TangentMatrix(n); P := 0; N := 0;
for p in Iterator:-Permute(n) do
m := mul(M[k, p(k)], k = 1..n);
if m = 0 then next fi;
if m = 1 then P := P + 1 fi;
if m = -1 then N := N + 1 fi; od;
if sgn = 'pos' then P else N fi end:
A347601 := n -> `if`(n = 0, 1, EulerPermutations(n, 'pos')):
seq(A347601(n), n = 0..8);
A347602
a(n) is the number of negative Euler permutations of order n.
Original entry on oeis.org
0, 0, 1, 0, 2, 28, 163, 812, 6724, 70216, 692741, 7183944, 86756038, 1155576132, 16135231015, 239656087572, 3838836369800, 65522667301840, 1178853270354697, 22361732381344592, 447322130002332298, 9399988542176154796, 206783054242756958891, 4754731473884444589756
Offset: 0
-
# Uses function EulerPermutations from A347601.
A347602 := n -> `if`(n = 0, 0, EulerPermutations(n, 'neg')):
seq(A347602(n), n = 0..8);
Showing 1-3 of 3 results.
Comments