OFFSET
1,5
COMMENTS
Row n is a permutation of {0, 1, ..., A045326(n)-1}.
LINKS
Alois P. Heinz, Rows n = 1..75, flattened
EXAMPLE
Triangle T(n,k) begins:
0, 1;
0, 1, 2;
0, 1, 3, 2, 5, 4, 6;
0, 1, 7, 9, 6, 3, 8, 5, 2, 4, 10;
0, 1, 15, 9, 3, 6, 2, 11, 12, 5, 14, 7, 8, 17, 13, 16, 10, 4, 18;
...
MAPLE
b:= proc(n) option remember; local p;
p:= 1+`if`(n=1, 1, b(n-1));
while irem(p, 4)<2 do p:= nextprime(p) od; p
end:
T:= n-> (p-> seq(modp(-(-1)^k*k^2, p), k=0..p-1))(b(n)):
seq(T(n), n=1..8);
MATHEMATICA
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[n_] := With[{p = b[n]}, Table[Mod[-(-1)^k*k^2, p], {k, 0, p - 1}]];
Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Oct 29 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Jan 09 2020
STATUS
approved