The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A070897 Number of ways of pairing numbers 1 to n with numbers n+1 to 2n such that each pair sums to a prime. 7
 1, 1, 1, 1, 2, 4, 8, 36, 40, 49, 126, 121, 440, 2809, 11395, 32761, 132183, 881721, 3015500, 19642624, 106493895, 249987721, 1257922092, 4609187881, 29262161844, 189192811369, 1068996265025, 7388339422500, 67416357342087 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 LINKS FORMULA a(n) = permanent(m), where the n X n matrix m is defined by m(i,j) = 1 or 0, depending on whether i+j+n is prime or composite, respectively. - T. D. Noe, Feb 10 2007 a(n) = A071058(n) * A071059(n). EXAMPLE a(5)=2 because there are two ways: 1+10, 2+9, 3+8, 4+7, 6+5 and 1+6, 2+9, 3+10, 4+7, 5+8. MATHEMATICA <n ]& /@Select[ Range[ n+2, 3*n ], PrimeQ ], 1 ]; po=Position[ it, # ]&/@Range[ n ]; permoid=(Extract[ it, # ]-n)& /@(po /. {i_Integer, j_}->{i, 1} ); Length@Backtrack[ permoid, UnsameQ@@#&, Length[ # ]===n&, All ] ]; Noe/@Range[ 2, 16 ] (* from Wouter Meeussen *) a[n_] := Permanent[Table[If[PrimeQ[i+j+n], 1, 0], {i, n}, {j, n}]]; Table[ an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 16}] (* Jean-François Alcover, Feb 26 2016 *) PROG (Haskell) import Data.List (permutations) a070897 n = length \$ filter (all ((== 1) . a010051))                      \$ map (zipWith (+) [1..n]) (permutations [n+1..2*n]) -- Reinhard Zumkeller, Mar 19 2011, Apr 16 2011 (fixed) CROSSREFS Cf. A000341, A071058, A071059, A073364. Sequence in context: A138744 A243547 A263623 * A180154 A320025 A172977 Adjacent sequences:  A070894 A070895 A070896 * A070898 A070899 A070900 KEYWORD nice,nonn AUTHOR T. D. Noe, May 23 2002 EXTENSIONS More terms from Don Reble, May 26 2002 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 18 15:16 EST 2021. Contains 340254 sequences. (Running on oeis4.)