OFFSET
0,4
EXAMPLE
For n = 5:
- we have the following permutations (shown in decimal and in binary):
p\k 1 2 3 4 5 | 1 10 11 100 101
--- ----------------+------------------------
p1 5 3 2 4 1 | 101 11 10 100 1
p2 5 2 3 4 1 | 101 10 11 100 1
p3 3 2 5 4 1 | 11 10 101 100 1
p4 5 2 1 4 3 | 101 10 1 100 11
p5 1 2 5 4 3 | 1 10 101 100 11
p6 3 2 1 5 4 | 11 10 1 101 100
p7 1 3 2 5 4 | 1 11 10 101 100
p8 1 2 3 5 4 | 1 10 11 101 100
p9 3 2 1 4 5 | 11 10 1 100 101
p10 1 3 2 4 5 | 1 11 10 100 101
p11 1 2 3 4 5 | 1 10 11 100 101
- so a(5) = 11.
PROG
(PARI) a(n) = matpermanent(matrix(n, n, i, j, bitand(i, j)>0))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 06 2022
STATUS
approved