cp's OEIS Frontend

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.

A331103 T(n,k) = -(-1)^k*k^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.

This page as a plain text file.
%I A331103 #21 Oct 29 2021 05:09:47
%S A331103 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,
%T A331103 5,14,7,8,17,13,16,10,4,18,0,1,19,9,7,2,10,3,5,12,15,6,17,8,11,18,20,
%U A331103 13,21,16,14,4,22,0,1,27,9,15,25,26,18,29,19,24
%N A331103 T(n,k) = -(-1)^k*k^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 A331103 Row n is a permutation of {0, 1, ..., A045326(n)-1}.
%H A331103 Alois P. Heinz, <a href="/A331103/b331103.txt">Rows n = 1..75, flattened</a>
%e A331103 Triangle T(n,k) begins:
%e A331103   0, 1;
%e A331103   0, 1,  2;
%e A331103   0, 1,  3, 2, 5, 4, 6;
%e A331103   0, 1,  7, 9, 6, 3, 8,  5,  2, 4, 10;
%e A331103   0, 1, 15, 9, 3, 6, 2, 11, 12, 5, 14, 7, 8, 17, 13, 16, 10, 4, 18;
%e A331103   ...
%p A331103 b:= proc(n) option remember; local p;
%p A331103       p:= 1+`if`(n=1, 1, b(n-1));
%p A331103       while irem(p, 4)<2 do p:= nextprime(p) od; p
%p A331103     end:
%p A331103 T:= n-> (p-> seq(modp(-(-1)^k*k^2, p), k=0..p-1))(b(n)):
%p A331103 seq(T(n), n=1..8);
%t A331103 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 A331103 T[n_] := With[{p = b[n]}, Table[Mod[-(-1)^k*k^2, p], {k, 0, p - 1}]];
%t A331103 Table[T[n], {n, 1, 8}] // Flatten (* _Jean-François Alcover_, Oct 29 2021, after _Alois P. Heinz_ *)
%Y A331103 Columns k=0-1 give: A000004, A000012.
%Y A331103 Last elements of rows give A281664.
%Y A331103 Row lengths give A045326.
%Y A331103 Row sums give A000217(A281664(n)).
%Y A331103 Cf. A331047.
%K A331103 nonn,look,tabf
%O A331103 1,5
%A A331103 _Alois P. Heinz_, Jan 09 2020