This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A367133 #33 Nov 16 2023 12:22:24 %S A367133 0,2,3,3,5,3,7,5,7,5,11,5,11,7,9,9,16,7,19,9,13,11,23,9,20,13,19,13, %T A367133 29,9,31,17,21,17,25,13,37,19,25,17,41,13,43,21,25,23,47,17,43,21,33, %U A367133 25,53,19,41,25,37,29,59,17,61,31,37,33,49,21,67,33,45,25 %N A367133 Rank of the n X n matrix whose terms are the n^2 values of isprime(x) from 1 to n^2. %C A367133 Traces of these matrices are A221490. %e A367133 For n=4, we consider the first n^2=16 terms of the characteristic function of primes (A010051): (0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0). These terms form a matrix by arranging them in 4 consecutive subsequences of 4 terms each: %e A367133 0, 1, 1, 0; %e A367133 1, 0, 1, 0; %e A367133 0, 0, 1, 0; %e A367133 1, 0, 0, 0; %e A367133 and the largest square submatrix with a nonzero determinant within this matrix is of dimension 3. Therefore, the rank is 3, and so a(4)=3. %p A367133 f:= proc(n) local i; LinearAlgebra:-Rank(Matrix(n,n,[seq(`if`(isprime(i),1,0),i=1..n^2)])) end proc: %p A367133 map(f, [$1..100]); # _Robert Israel_, Nov 11 2023 %t A367133 mat[n_,i_,j_]:=Boole[PrimeQ[(i-1)*n+j]]; %t A367133 a[n_]:=MatrixRank@Table[mat[n,i,j],{i,1,n},{j,1,n}]; %t A367133 Table[a[n],{n,1,70}] %o A367133 (PARI) a(n) = matrank(matrix(n, n, i, j, isprime((i-1)*n+j))); \\ _Michel Marcus_, Nov 07 2023 %o A367133 (Python) %o A367133 from sympy import Matrix, isprime %o A367133 def A367133(n): return Matrix(n,n,[int(isprime(i)) for i in range(1,n**2+1)]).rank() # _Chai Wah Wu_, Nov 16 2023 %Y A367133 Cf. A010051, A064866, A289777, A367077, A221490. %K A367133 nonn %O A367133 1,2 %A A367133 _Andres Cicuttin_, Nov 06 2023