A340869 Numbers k such that the determinant of the 3 X 3 matrix [prime(k),prime(k+1),prime(k+2); prime(k+3),prime(k+4),prime(k+5); prime(k+6),prime(k+7),prime(k+8)] is a square.
4, 12, 14, 131, 222, 229, 330, 351, 356, 525, 561, 825, 969, 979, 1009, 1115, 1123, 1243, 1722, 1826, 2221, 2632, 2673, 2814, 3167, 3436, 3437, 3966, 4056, 4307, 4583, 5010, 5137, 5509, 5772, 6031, 6034, 6230, 6233, 6363, 6505, 6532, 6794, 7112, 7551, 8154, 8330, 8476, 9260, 9348, 9349, 9613
Offset: 1
Keywords
Examples
a(3) = 14 is a term because A117330(14) = Determinant([43,47,53; 59,61,67; 71,73,79]) = 144 = 12^2.
Links
- Robert Israel, Table of n, a(n) for n = 1..3000
Programs
-
Maple
f:= proc(n) local i; LinearAlgebra:-Determinant(Matrix(3,3,[seq(ithprime(i),i=n..n+8)])) end proc: select(t -> issqr(f(t)), [$1..10000]);
-
Mathematica
okQ[k_] := IntegerQ@ Sqrt@ Det@ Partition[Prime[k+#]& /@ Range[0, 8], 3]; Select[Range[10000], okQ] (* Jean-François Alcover, Feb 10 2023 *)
-
PARI
isok(k) = issquare(matdet(matrix(3,3,i,j,prime((k+j-1)+3*(i-1))))); \\ Michel Marcus, Jan 25 2021
-
Python
from sympy import nextprime, Matrix, integer_nthroot k,A340869_list, plist = 1,[], [2, 3, 5, 7, 11, 13, 17, 19, 23] while k < 10**7: d = Matrix(plist).reshape(3,3).det() if d >= 0 and integer_nthroot(d,2)[1]: A340869_list.append(k) k,plist = k+1,plist[1:]+[nextprime(plist[-1])] # Chai Wah Wu, Jan 25 2021
Comments