OFFSET
1,2
COMMENTS
Though the first 27 terms are positive, we have a(50) = 0 since all the numbers 50!*k + 1, with k = 1..50, are composite.
EXAMPLE
a(2) = 2 since (1,2) and (2,1) are permutations of {1,2} with 1!*1 + 1 = 2, 2!*2 + 1 = 5, 1!*2 + 1 = 3 and 2!*1 + 1 = 3 all prime.
MATHEMATICA
a[n_]:=a[n]=Permanent[Table[Boole[PrimeQ[i!*j+1]], {i, 1, n}, {j, 1, n}]]; Do[Print[n, " ", a[n]], {n, 1, 27}]
PROG
(PARI) a(n)={matpermanent(matrix(n, n, i, j, isprime(i!*j+1)))} \\ Andrew Howroyd, Nov 19 2018
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Zhi-Wei Sun, Nov 19 2018
EXTENSIONS
a(28)-a(31) from Jinyuan Wang, Jun 13 2020
a(32)-a(36) from Vaclav Kotesovec, Aug 19 2021
STATUS
approved