OFFSET
0,3
COMMENTS
A divisibility sequence by construction: a(n) divides a(m) if n divides m.
LINKS
Jianing Song, Table of n, a(n) for n = 0..1000
Wikipedia, Elliptic curves over finite fields
Index entries for linear recurrences with constant coefficients, signature (4,-6,12,-9).
FORMULA
a(n) = (3^n + 1 - (sqrt(3)*i)^n - (-sqrt(3)*i)^n)/4, i = sqrt(-1).
G.f.: (1/(1-3*x) + 1/(1-x) - 2/(1+3*x^2))/4.
E.g.f.: (exp(3*x) + exp(x) - 2*cos(sqrt(3)*x))/4.
EXAMPLE
For n = 1, the points on y^2 = x^3 - x in GF(3) are the point of infinity, (-1,0), (0,0), and (1,0), so a(1) = 4/4 = 1. This implies that the number of points in GF(3^n) is 3^n + 1 - alpha^n - beta^n, where alpha + beta = 3+1-4 = 0 and alpha*beta = 3.
MATHEMATICA
LinearRecurrence[{4, -6, 12, -9}, {0, 1, 4, 7}, 30] (* Paolo Xausa, Jan 22 2026 *)
PROG
(PARI) a(n) = if(n%2, 3^n+1, ((-3)^(n/2)-1)^2)/4
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Mar 17 2025
STATUS
approved
