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 A192507 #24 Apr 26 2024 12:25:50 %S A192507 0,0,1,2,7,14,52,104,333,870,2571,4590,20440,56736,133782,327558, %T A192507 1265391,2612694,10188836,20769420,76562106 %N A192507 Number of conjugacy classes of primitive elements in GF(3^n) which have trace 0. %C A192507 Also number of primitive polynomials of degree n over GF(3) whose second-highest coefficient is 0. %F A192507 a(n) = A192212(n) / n. %o A192507 (GAP) %o A192507 p := 3; %o A192507 a := function(n) %o A192507 local q, k, cnt, x; %o A192507 q:=p^n; k:=GF(p, n); cnt:=0; %o A192507 for x in k do %o A192507 if Trace(k, GF(p), x)=0*Z(p) and Order(x)=q-1 then %o A192507 cnt := cnt+1; %o A192507 fi; %o A192507 od; %o A192507 return cnt/n; %o A192507 end; %o A192507 for n in [1..16] do Print (a(n), ", "); od; %o A192507 (Sage) # much more efficient %o A192507 p=3; # choose characteristic %o A192507 for n in range(1,66): %o A192507 F = GF(p^n, 'x') %o A192507 g = F.multiplicative_generator() # generator %o A192507 vt = vector(ZZ,p) # stats: trace %o A192507 m = p^n - 1 # size of multiplicative group %o A192507 # Compute all irreducible polynomials via Lyndon words: %o A192507 for w in LyndonWords(p,n): # digits of Lyndon words range form 1,..,p %o A192507 e = sum( (w[j]-1) * p^j for j in range(0,n) ) %o A192507 if gcd(m, e) == 1: # primitive elements only %o A192507 f = g^e %o A192507 t = f.trace().lift(); # trace (over ZZ) %o A192507 vt[t] += 1 %o A192507 print(vt[0]) # choose index 0,1,..,p-1 for different traces %o A192507 # _Joerg Arndt_, Oct 03 2012 %Y A192507 Cf. A152049 (GF(2^n)), A192507 (GF(5^n)), A192509 (GF(7^n)), A192510 (GF(11^n)), A192511 (GF(13^n)). %Y A192507 Cf. A027385 (number of primitive polynomials of degree n over GF(3)). %K A192507 nonn,hard,more %O A192507 1,4 %A A192507 _Joerg Arndt_, Jul 03 2011 %E A192507 Added terms >=2571, _Joerg Arndt_, Oct 03 2012 %E A192507 a(18)-a(21) from _Robin Visser_, Apr 26 2024