A321766 Number of permutations f of {1,...,n} such that 3^k + 3^(f(k)) - 1 is prime for every k = 1,...,n.
1, 2, 3, 11, 14, 33, 59, 290, 843, 690, 231, 978, 2896, 2966, 38252, 384917, 22351, 68546, 28245, 147459, 84578, 17647, 17647, 232213, 17647, 792, 93640, 785178, 5635699, 11658279, 67706584, 351837312, 233636388, 26967286, 35027435, 242576452
Offset: 1
Keywords
Examples
a(2) = 2 since both (1,2) and (2,1) are permutations of {1,2}, and 3^1 + 3^1 - 1 = 5, 3^2 + 3^2 - 1 = 17, 3^1 + 3^2 - 1 = 11 and 3^2 + 3^1 - 1 = 11 are all prime.
Links
- Zhi-Wei Sun, Conjectures on representations involving primes, in: M. Nathanson (ed.), Combinatorial and Additive Number Theory II, Springer Proc. in Math. & Stat., Vol. 220, Springer, Cham, 2017, pp. 279-310. (See also arXiv:1211.1588 [math.NT], 2012-2017.)
Programs
-
Maple
N:= 25: # to get a(1)..a(N) q:= proc(i,j) if isprime(3^i+3^j-1) then 1 else 0 fi end proc: M:= Matrix(N,N, q, shape=symmetric): seq(LinearAlgebra:-Permanent(M[1..n,1..n]), n=1..N); # Robert Israel, Dec 08 2019
-
Mathematica
a[n_]:=a[n]=Permanent[Table[Boole[PrimeQ[3^i+3^j-1]],{i,1,n},{j,1,n}]]; Do[Print[n," ",a[n]],{n,1,30}]
-
PARI
a(n) = matpermanent(matrix(n, n, i, j, ispseudoprime(3^i + 3^j - 1))); \\ Jinyuan Wang, Jun 13 2020
Extensions
a(31) from Jinyuan Wang, Jun 13 2020
a(32)-a(36) from Vaclav Kotesovec, Aug 18 2021
Comments