%I #25 Apr 12 2026 19:21:24
%S 1,-1,7,8,-11,-8,9,-5,27,-41,79,61,4,-80,-103,123,-64,169,67,-143,-59,
%T 125,256,212,-125,-261,-236,-304,216,-371,49,-25,517,-435,221,-365,
%U 544,515,343,16,504,220,-343,505,-536,891,-521,81,719,-171,-512,1169,-999,-321
%N Product of the three cubic Gauss periods for primes q == 1 (mod 3).
%C a(n) is the product of the three cubic Gauss periods for the n-th prime q == 1 (mod 3).
%D B. C. Berndt, R. J. Evans, and K. S. Williams, Gauss and Jacobi Sums, Wiley-Interscience, 1998, Theorem 2.5.1.
%D K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, 2nd ed., Springer GTM 84, 1990, Chapters 8-9.
%H Dao Van Tam, <a href="/A394567/b394567.txt">Table of n, a(n) for n = 1..10000</a>
%H Dao Van Tam, <a href="https://github.com/tamddao/GaussCubicPeriods">Lean 4 formal verification</a>
%F a(n) = ((c + 3)*q - 1)/27 where q = A002476(n), x and y are integers with q = x^2 + x*y + 7*y^2 and gcd(x,y) = 1, and c = 2*x + y with c == 1 (mod 3).
%F a(n) = (L^3 - 3*q*L + 3*q - 1)/27 where 4*q = L^2 + 27*M^2, L == 1 (mod 3), with L = 2*x + y (Berndt-Evans-Williams, Theorem 2.5.1).
%e a(1) = 1: q=7 = (0)^2+(0)*(1)+7*(1)^2, c = 2*(0)+1 = 1, ((1+3)*7-1)/27 = 1.
%e a(2) = -1: q=13 = (-3)^2+(-3)*(1)+7*(1)^2, c = 2*(-3)+1 = -5, ((-5+3)*13-1)/27 = -1.
%e a(3) = 7: q=19 = (4)^2+(4)*(-1)+7*(-1)^2, c = 2*(4)+(-1) = 7, ((7+3)*19-1)/27 = 7.
%o (PARI) e3(q) = for(b=-sqrtint(4*q\27)-1, sqrtint(4*q\27)+1, my(d=4*q-27*b^2, s); if(d>=0 && issquare(d, &s), for(j=0, 1, my(a=(-b+(-1)^j*s)/2); if(type(a)=="t_INT" && a^2+a*b+7*b^2==q && gcd(abs(a), abs(b))==1, my(c=2*a+b); if(c%3==1, return(((c+3)*q-1)/27)); if((-c)%3==1, return(((-c+3)*q-1)/27))))));
%o a(n) = my(cnt=0); forprime(q=7, +oo, if(q%3==1, cnt++; if(cnt==n, return(e3(q)))));
%Y Cf. A002476.
%K sign
%O 1,3
%A _Dao Van Tam_, Mar 24 2026