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 A362190 #15 May 08 2023 02:28:39 %S A362190 0,1,2,3,0,1,2,4,3,0,5,1,2,4,3,4,3,0,1,2,5,6,5,4,3,0,1,2,7,8,6,2,4,3, %T A362190 0,1,9,10,5,7,1,2,4,3,0,8,6,9,10,5,0,1,2,4,3,10,7,8,6,9,4,3,0,1,2,5, %U A362190 11,9,10,5,7,6,8,4,3,0,1,2 %N A362190 Triangle read by rows: T(n,k) is the smallest integer not already in the same row or column and also not diagonally adjacent to an equal integer. %C A362190 This sequence is A025581 without diagonal adjacent restriction. %H A362190 Neal Gersh Tolunsky, <a href="/A362190/b362190.txt">Table of n, a(n) for n = 1..10000</a> %e A362190 Triangle begins: %e A362190 n\k| 1 2 3 4 5 6 7 8 ... %e A362190 ---+---------------------------- %e A362190 1 | 0 %e A362190 2 | 1 2 %e A362190 3 | 3 0 1 %e A362190 4 | 2 4 3 0 %e A362190 5 | 5 1 2 4 3 %e A362190 6 | 4 3 0 1 2 5 %e A362190 7 | 6 5 4 3 0 1 2 %e A362190 8 | 7 8 6 2 4 3 0 1 %o A362190 (PARI) \\ here f(S) gives smallest not in set S. %o A362190 f(S)={for(k=0, oo, if(!setsearch(S,k), return(k)))} %o A362190 T(n)={my(M=matrix(n,n)); for(i=2, n, for(j=1, i, my(S=Set(concat([M[j..i-1,j]~, M[i,1..j-1], M[i-1,max(1,j-1)], M[i-1,min(j+1,i-1)]]))); M[i,j]=f(S))); M} %o A362190 { my(A=T(10)); for(i=1, #A, print(A[i, 1..i])) } \\ _Andrew Howroyd_, Apr 10 2023 %Y A362190 Cf. A025581. %K A362190 nonn,easy,tabl %O A362190 1,3 %A A362190 _Gavin Lupo_, Apr 10 2023