%I #13 Aug 28 2023 15:50:43
%S 5,8,12,18,22,32,36,42,46,60,66,80,84,90,94,108,118,128,138,142,152,
%T 162,166,180,200,204,210,214,224,228,258,262,276,282,300,306,320,330,
%U 334,348,358,368,382,392,396,402,426,450,454,464,468,478,488,502,516,526,540,546,560,564,570
%N a(n) = number of isomorphism classes of elliptic curves over the finite field of order prime(n).
%H Paolo Xausa, <a href="/A362243/b362243.txt">Table of n, a(n) for n = 1..10000</a>
%H H. W. Lenstra, <a href="https://www.jstor.org/stable/1971363">Factoring integers with elliptic curves</a>, Ann. of Math. (2) 126 (1987), no. 3, 649-673.
%H S. Marseglia, <a href="https://arxiv.org/abs/1808.03673">Computing abelian varieties over finite fields isogenous to a power</a>, arXiv:1808.03673 [math.AG], 2018.
%F a(1) = 5, a(2) = 8, and for n > 2, a(n) = 2*prime(n) + C, where C is 6, 2, 4, 0 if prime(n) is 1, 5, 7, 11 mod 12 respectively.
%e For n = 1, the a(1) = 5 elliptic curves over F_2 can be given by their Weierstrass models as: y^2 + y = x^3, y^2 + y = x^3 + x, y^2 + y = x^3 + x + 1, y^2 + x*y = x^3 + 1, y^2 + x*y + y = x^3 + 1.
%e For n = 2, the a(2) = 8 elliptic curves over F_3 can be given by their Weierstrass models as: y^2 = x^3 + x, y^2 = x^3 + 2*x, y^2 = x^3 + 2*x + 1, y^2 = x^3 + 2*x + 2, y^2 = x^3 + x^2 + 1, y^2 = x^3 + x^2 + 2, y^2 = x^3 + 2*x^2 + 1, y^2 = x^3 + 2*x^2 + 2.
%e For n = 3, the a(3) = 12 elliptic curves over F_5 can be given by their Weierstrass models as: y^2 = x^3 + 1, y^2 = x^3 + 2, y^2 = x^3 + x, y^2 = x^3 + x + 1, y^2 = x^3 + x + 2, y^2 = x^3 + 2*x, y^2 = x^3 + 2*x + 1, y^2 = x^3 + 3*x, y^2 = x^3 + 3*x + 2, y^2 = x^3 + 4*x, y^2 = x^3 + 4*x + 1, y^2 = x^3 + 4*x + 2.
%t A362243list[nmax_]:=Map[2#+{6,1,2,0,2,0,4,0,0,0,0}[[Mod[#,12]]]&,Prime[Range[nmax]]];A362243list[100] (* _Paolo Xausa_, Aug 28 2023 *)
%o (Sage)
%o def a(n):
%o if n == 1:
%o return 5
%o if n == 2:
%o return 8
%o p = Primes()[n-1]
%o r = [1, 5, 7, 11]
%o C = [6, 2, 4, 0]
%o return 2*p + C[r.index(p%12)]
%K nonn
%O 1,1
%A _Robin Visser_, Apr 12 2023