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 A385865 #34 Jul 17 2025 14:50:53 %S A385865 1,1,1,1,4,1,1,4,4,1,1,4,3,4,1,1,4,2,2,4,1,1,4,1,8,1,4,1,1,4,9,7,7,9, %T A385865 4,1,1,4,9,6,5,6,9,4,1,1,4,9,5,3,3,5,9,4,1,1,4,9,4,1,12,1,4,9,4,1,1,4, %U A385865 9,3,12,10,10,12,3,9,4,1,1,4,9,2,11,8,7,8,11,2,9,4,1,1 %N A385865 Triangle read by rows where T(n,k), for 1 <= k < n, is the column number where (n-k)^2 occurs in an n X n grid filled rowwise with the numbers 1 to n^2. %C A385865 Columns are numbered starting from 1. %F A385865 T(n, k) = ((k^2 - 1) mod n) + 1. %e A385865 k=1 2 3 4 5 6 %e A385865 n=2: 1 %e A385865 n=3: 1, 1 %e A385865 n=4: 1, 4, 1 %e A385865 n=5: 1, 4, 4, 1 %e A385865 n=6: 1, 4, 3, 4, 1 %e A385865 n=7: 1, 4, 2, 2, 4, 1 %e A385865 For n = 5, the grid is %e A385865 1 2 3 4 5 %e A385865 6 7 8 9 10 %e A385865 11 12 13 14 15 %e A385865 16 17 18 19 20 %e A385865 21 22 23 24 25 %e A385865 The squares (n-k)^2 = {16, 9, 4, 1} are in column numbers {1, 4, 4, 1} respectively. %t A385865 T[n_,k_]:=Mod[k^2-1,n]+1;Table[T[n,k],{n,0,14},{k,n-1}]//Flatten (* _James C. McMahon_, Jul 16 2025 *) %o A385865 (PARI) row(n) = vector(n-1, k, (k^2-1) % n + 1); \\ _Michel Marcus_, Jul 11 2025 %Y A385865 Cf. A385866. %K A385865 nonn,easy,tabl %O A385865 2,5 %A A385865 _Binay Krishna Maity_, Jul 10 2025