OFFSET
1,1
COMMENTS
Numbers k such that A117330(k) is a square.
LINKS
Robert Israel, Table of n, a(n) for n = 1..3000
EXAMPLE
a(3) = 14 is a term because A117330(14) = Determinant([43,47,53; 59,61,67; 71,73,79]) = 144 = 12^2.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 24 2021
STATUS
approved