OFFSET
2,5
COMMENTS
See A014000 for much more about this sequence. - N. J. A. Sloane, Jun 14 2013
From Jianing Song, Mar 22 2026: (Start)
If (x0,y0) is the smallest positive solution to x^2 - D*y^2 = +-4, D = A003658(n), then a(n) = y0. Note that A014000(n) = x_0/2 if D == 0 (mod 4), (x_0-y_0)/2 if D == 1 (mod 4).
Let K be the real quadratic field of discriminant A003658(n). Then a(n) is the index in O_K of the quadratic order generated by units in O_K. (End)
REFERENCES
H. Cohen, A Course in Computational Algebraic Number Theory, Springer, 1993, pp. 515-519.
LINKS
Jianing Song, Table of n, a(n) for n = 2..10000
S. R. Finch, Class number theory
Steven R. Finch, Class number theory [Cached copy, with permission of the author]
PROG
(PARI) lista(nn) = { for (n=2, nn, if (isfundamental(n), nc = core(n); m = Mod (nc, 4); if ((m == 2) || (m == 3), d = 1); if ((m == 1), d = 4); b = 1; a = 0; while (a == 0, v = nc*b^2; if (issquare(v-d), a = sqrtint(v-d), if (issquare(v+d), a = sqrtint(v+d))); if (a == 0, b++; ); ); print1(b, ", "); ); ); } \\ Michel Marcus, Sep 25 2018
(PARI) for(D=2, 200, if(isfundamental(D), print1(imag(quadunit(D)), ", "))) \\ Jianing Song, Mar 22 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Rains (rains(AT)caltech.edu)
EXTENSIONS
Offset corrected by Jianing Song, Mar 31 2019
STATUS
approved
