%I #24 Jan 09 2024 13:14:00
%S 1,4,4,1,4,4,0,0,1,4,4,0,4,8,0,0,4,1,4,8,8,8,8,8,0,4,0,0,0,0,1,4,4,4,
%T 12,12,12,8,12,12,12,0,8,8,8,0,0,0,4,0,0,1,4,4,4,12,8,4,8,4,4,12,8,12,
%U 24,8,8,8,0,4,8,4,8,8,0,4
%N Irregular triangle read by rows: T(n,k) = [x^k] (Sum_{i=0..prime(n)-1} (1+Legendre(i,prime(n))) * x^i)^2, for 0 <= k <= 2*prime(n)-2.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Gauss_sum">Gauss sum</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Legendre_symbol">Legendre symbol</a>.
%F For n > 1, Sum_{k=0..2*prime(n)-2} T(n,k)*x^k == (-1)^((p - 1)/2) * p mod ((x^p - 1)/(x - 1)) where p is n-th prime.
%e Triangle begins
%e [1, 4, 4],
%e [1, 4, 4, 0, 0],
%e [1, 4, 4, 0, 4, 8, 0, 0, 4],
%e [1, 4, 8, 8, 8, 8, 8, 0, 4, 0, 0, 0, 0],
%e [1, 4, 4, 4, 12, 12, 12, 8, 12, 12, 12, 0, 8, 8, 8, 0, 0, 0, 4, 0, 0],
%e [1, 4, 4, 4, 12, 8, 4, 8, 4, 4, 12, 8, 12, 24, 8, 8, 8, 0, 4, 8, 4, 8, 8, 0, 4],
%e ...
%e ------------------------------------------
%e 1 + 4*x + 4*x^2 = 4*(x^3 - 1)/(x - 1) - 3.
%e 1 + 4*x + 4*x^2 + 4*x^4 + 8*x^5 + 4*x^8 = 4 * (x^4 - x^3 + 2*x - 1)*(x^5 - 1)/(x - 1) + 5.
%e 1 + 4*x + 8*x^2 + 8*x^3 + 8*x^4 + 8*x^5 + 8*x^6 + 4*x^8 = 4 * (x^2 - x + 2)*(x^7 - 1)/(x - 1) - 7.
%o (PARI) forprime(p=2, 30, print(Vecrev((sum(k=0, p-1, (1+kronecker(k, p))*x^k))^2, 2*p-1),", "))
%Y Cf. A073579, A226520.
%K nonn,tabf
%O 1,2
%A _Seiichi Manyama_, Sep 28 2019