OFFSET
1,3
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..35
FORMULA
a(n) = permanent(m), where the n X n matrix m is defined by m(i,j) = 1 or 0, depending on whether 2i+2j+1 is prime or composite, respectively.
EXAMPLE
a(3)=2 because for the set {2..7} there are two ways: {{2,3},{4,7},{5,6}} and {{2,5},{3,4},{6,7}}.
MATHEMATICA
a[n_] := Permanent[Array[Boole[PrimeQ[2 #1 + 2 #2 + 1]]&, {n, n}]];
Array[a, 15] (* Jean-François Alcover, Nov 03 2018 *)
PROG
(PARI) a(n)={matpermanent(matrix(n, n, i, j, isprime(2*i + 2*j + 1)))} \\ Andrew Howroyd, Nov 03 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Oct 17 2007
EXTENSIONS
a(21)-a(26) from Andrew Howroyd, Nov 03 2018
STATUS
approved