OFFSET
2,2
COMMENTS
LINKS
Robin Visser, Table of n, a(n) for n = 2..10000
Se Wook Jang and Byeong Moon Kim, A refinement of the Dress-Scharlau theorem, J. Number Theory 158 (2016), 234-243.
Magdaléna Tinková and Paul Voutier, Indecomposable integers in real quadratic fields, J. Number Theory 212 (2020), 458-482.
FORMULA
EXAMPLE
For n = 2, the field Q(sqrt(A005117(2))) = Q(sqrt(2)) contains the integral element 1 + sqrt(2) which has norm -1, thus a(2) = 1.
For n = 3, the field Q(sqrt(A005117(3))) = Q(sqrt(3)) contains the integral element 1 + sqrt(3) which has norm -2, but contains no unit of norm -1, thus a(3) = 2.
For n = 4, the field Q(sqrt(A005117(4))) = Q(sqrt(5)) contains the integral element 1/2 + sqrt(5)/2 which has norm -1, thus a(4) = 1.
PROG
(SageMath)
def a(n):
D = [d for d in range(2*n) if Integer(d).is_squarefree()][n-1]
K.<a> = QuadraticField(D); UK = K.unit_group()
if UK.fundamental_units()[0].norm() == -1: return 1
idls = K.ideals_of_bdd_norm(D)
for (k, I) in [(x, y) for x in range(1, D) for y in idls[x]]:
ans = -(I.gens_reduced()[0].norm())
if I.is_principal() and ans > 0: return ans
CROSSREFS
KEYWORD
nonn
AUTHOR
Robin Visser, Sep 03 2025
STATUS
approved
