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 A331047 #26 Oct 29 2021 05:09:17 %S A331047 0,1,0,1,2,0,1,6,4,3,2,5,0,1,10,4,7,9,2,5,6,3,8,0,1,18,4,15,9,10,16,3, %T A331047 6,13,17,2,11,8,7,12,5,14,0,1,22,4,19,9,14,16,7,2,21,13,10,3,20,18,5, %U A331047 12,11,8,15,6,17,0,1,30,4,27,9,22,16,15,25,6,5 %N A331047 T(n,k) = -(-1)^k*ceiling(k/2)^2 mod p, where p is the n-th prime congruent to 2 or 3 mod 4; triangle T(n,k), n>=1, 0<=k<=p-1, read by rows. %C A331047 Row n is a permutation of {0, 1, ..., A045326(n)-1}. %H A331047 Alois P. Heinz, <a href="/A331047/b331047.txt">Rows n = 1..75, flattened</a> %e A331047 Triangle T(n,k) begins: %e A331047 0, 1; %e A331047 0, 1, 2; %e A331047 0, 1, 6, 4, 3, 2, 5; %e A331047 0, 1, 10, 4, 7, 9, 2, 5, 6, 3, 8; %e A331047 0, 1, 18, 4, 15, 9, 10, 16, 3, 6, 13, 17, 2, 11, 8, 7, 12, 5, 14; %e A331047 ... %p A331047 b:= proc(n) option remember; local p; %p A331047 p:= 1+`if`(n=1, 1, b(n-1)); %p A331047 while irem(p, 4)<2 do p:= nextprime(p) od; p %p A331047 end: %p A331047 T:= n-> (p-> seq(modp(-(-1)^k*ceil(k/2)^2, p), k=0..p-1))(b(n)): %p A331047 seq(T(n), n=1..8); %t A331047 b[n_] := b[n] = Module[{p}, p = 1+If[n == 1, 1, b[n-1]]; While[Mod[p, 4]<2, p = NextPrime[p]]; p]; %t A331047 T[n_] := With[{p = b[n]}, Table[Mod[-(-1)^k*Ceiling[k/2]^2, p], {k, 0, p-1}]]; %t A331047 Table[T[n], {n, 1, 8}] // Flatten (* _Jean-François Alcover_, Oct 29 2021, after _Alois P. Heinz_ *) %Y A331047 Columns k=0-2 give: A000004, A000012, A281664 (for n>1). %Y A331047 Last elements of rows give A190105(n-1) for n>1. %Y A331047 Row lengths give A045326. %Y A331047 Row sums give A000217(A281664(n)). %Y A331047 Cf. A000040, A230077, A331103. %K A331047 nonn,look,tabf %O A331047 1,5 %A A331047 _Alois P. Heinz_, Jan 08 2020