login
Determinant of n X n matrix whose rows are cyclic permutations of 1..n-th nonprime (A018252).
1

%I #11 May 30 2021 13:38:04

%S 1,-15,-209,3895,58828,-987012,-32251150,1259339776,33525669556,

%T -973603483875,-54655725143297,3308661532816640,125757090803564374,

%U -5201646874854669888,-415867280417850247000,19065322853430198710625,898206693379667144028053

%N Determinant of n X n matrix whose rows are cyclic permutations of 1..n-th nonprime (A018252).

%H Harvey P. Dale, <a href="/A067560/b067560.txt">Table of n, a(n) for n = 1..300</a>

%e a(4) = 3895 because this is the determinant of [(1,4,6,8), (4,6,8,1), (6,8,1,4), (8,1,4,6)]

%t NonPrime[n_Integer] := FixedPoint[n + PrimePi[ # ] &, n + PrimePi[n]]; f[n_] := Module[{a = Table[ NonPrime[i], {i, 1, n} ], m = {}, k = 0}, While[k < n, m = Append[m, RotateLeft[a, k]]; k++ ]; Det[m]]; Table[ f[n], {n, 1, 18} ]

%t Module[{nn=30,np,len},np=Select[Range[nn],!PrimeQ[#]&];len=Length[ np];Table[ Det[NestList[RotateLeft[#]&,Take[np,n],n-1]],{n,len}]] (* _Harvey P. Dale_, May 30 2021 *)

%K easy,sign

%O 1,2

%A _Robert G. Wilson v_, Jan 29 2002