%I #23 Jul 23 2023 13:42:26
%S 35,63,129,207,401,513,765,897,1193,1683,1861,2425,2821,3031,3461,
%T 4139,4861,5109,5877,6409,6683,7521,8099,8987,10223,10865,11185,11839,
%U 12173,12849,15301,16031,17143,17519,19441,19833,21027,22239,23065,24317,25589,26019,28203,28647,29545,29993
%N a(n) = number of isogeny classes of abelian surfaces over the finite field of order prime(n).
%C Two abelian varieties over a finite field are isogenous if and only if their Hasse-Weil zeta functions coincide.
%C Thus a(n) is the number of degree 4 integer polynomials with leading coefficient prime(n)^2, whose (complex) roots all have absolute value 1/sqrt(prime(n)).
%H Robin Visser, <a href="/A362198/b362198.txt">Table of n, a(n) for n = 1..1000</a>
%H S. A. DiPippo and E. W. Howe, <a href="https://arxiv.org/abs/math/9803097">Real polynomials with all roots on the unit circle and abelian varieties over finite fields</a>, arXiv:math/9803097 [math.NT], 1998-2000.
%H T. Dupuy, K. Kedlaya, D. Roe, and C. Vincent, <a href="https://arxiv.org/abs/2003.05380">Isogeny Classes of Abelian Varieties over Finite Fields in the LMFDB</a>, arXiv:2003.05380 [math.NT], 2020.
%H D. W. Farmer, S. Koutsoliotas, and S. Lemurell, <a href="https://doi.org/10.1016/j.jnt.2018.01.019">Varieties via their L-functions</a>, J. Number Theory 196 (2019), 364-380.
%H LMFDB, <a href="https://www.lmfdb.org/Variety/Abelian/Fq/?search_type=Counts">Abelian variety count results</a>.
%H W. C. Waterhouse, <a href="https://doi.org/10.24033/asens.1183">Abelian varieties over finite fields</a>, Ann. Sci. École Norm. Sup. (4) 2 (1969), 521-560.
%F a(n) ~ (32/3) * prime(n)^(3/2).
%e For n = 1, the a(1) = 35 possible isogeny classes correspond to the following 35 possible Hasse-Weil zeta functions of abelian surfaces over F_2: 4x^4 - 8x^3 + 8x^2 - 4x + 1, 4x^4 - 6x^3 + 5x^2 - 3x + 1, 4x^4 - 6x^3 + 6x^2 - 3x + 1, 4x^4 - 4x^3 + 2x^2 - 2x + 1, 4x^4 - 4x^3 + 3x^2 - 2x + 1, 4x^4 - 4x^3 + 4x^2 - 2x + 1, 4x^4 - 4x^3 + 5x^2 - 2x + 1, 4x^4 - 2x^3 - x^2 - x + 1, 4x^4 - 2x^3 - x + 1, 4x^4 - 2x^3 + x^2 - x + 1, 4x^4 - 2x^3 + 2x^2 - x + 1, 4x^4 - 2x^3 + 3x^2 - x + 1, 4x^4 - 2x^3 + 4x^2 - x + 1, 4x^4 - 4x^2 + 1, 4x^4 - 3x^2 + 1, 4x^4 - 2x^2 + 1, 4x^4 - x^2 + 1, 4x^4 + 1, 4x^4 + x^2 + 1, 4x^4 + 2x^2 + 1, 4x^4 + 3x^2 + 1, 4x^4 + 4x^2 + 1, 4x^4 + 2x^3 - x^2 + x + 1, 4x^4 + 2x^3 + x + 1, 4x^4 + 2x^3 + x^2 + x + 1, 4x^4 + 2x^3 + 2x^2 + x + 1, 4x^4 + 2x^3 + 3x^2 + x + 1, 4x^4 + 2x^3 + 4x^2 + x + 1, 4x^4 + 4x^3 + 2x^2 + 2x + 1, 4x^4 + 4x^3 + 3x^2 + 2x + 1, 4x^4 + 4x^3 + 4x^2 + 2x + 1, 4x^4 + 4x^3 + 5x^2 + 2x + 1, 4x^4 + 6x^3 + 5x^2 + 3x + 1, 4x^4 + 6x^3 + 6x^2 + 3x + 1, 4x^4 + 8x^3 + 8x^2 + 4x + 1.
%o (Sage)
%o from sage.rings.polynomial.weil.weil_polynomials import WeilPolynomials
%o def a(n):
%o p = Primes()[n-1]
%o return len(list(WeilPolynomials(4,p)))
%o (Sage)
%o def a(n):
%o R.<x> = PolynomialRing(CC)
%o num_solutions = 0
%o p = Primes()[n-1]
%o for Cp in range(ceil(p+1-4*sqrt(p)), floor(p+1+4*sqrt(p))+1):
%o for Cp2 in range(ceil(p^2+1-4*p), floor(p^2+1+4*p)+1):
%o a2 = (Cp^2 + Cp2 + 2*p*(1-Cp) - 2*Cp)
%o if a2%2 != 0:
%o continue
%o L_poly = 1 + (Cp-p-1)*x + a2/2*x^2 + p*(Cp-p-1)*x^3 + p^2*x^4
%o for r in L_poly.roots():
%o if (abs(abs(r[0]) - 1/sqrt(p)) > 1e-12):
%o break
%o else:
%o num_solutions += 1
%o return num_solutions
%Y Cf. A362201, A362570.
%K nonn
%O 1,1
%A _Robin Visser_, Apr 10 2023