A134293 Number of ways to pair up {2..2n+1} so the sum of each pair is prime.
1, 1, 2, 6, 20, 60, 190, 764, 2337, 9812, 49538, 330058, 2133438, 11192143, 73469550, 462692414, 3692965270, 32635321384, 290171883863, 2572828730372, 22299380503953, 195129375058656, 1544534855847233, 13144353749969945, 128883813733449772, 1365629506139662111
Offset: 1
Keywords
Examples
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}}.
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 1..35
Programs
-
Mathematica
a[n_] := Permanent[Array[Boole[PrimeQ[2 #1 + 2 #2 + 1]]&, {n, n}]]; Array[a, 15] (* Jean-François Alcover, Nov 03 2018 *)
-
PARI
a(n)={matpermanent(matrix(n,n,i,j,isprime(2*i + 2*j + 1)))} \\ Andrew Howroyd, Nov 03 2018
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.
Extensions
a(21)-a(26) from Andrew Howroyd, Nov 03 2018
Comments