cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A387203 Number of additively indecomposable elements in the real quadratic field Q(sqrt(D)) up to multiplication by totally positive units, where D = A005117(n) is the n-th squarefree number.

This page as a plain text file.
%I A387203 #9 Aug 28 2025 00:43:03
%S A387203 2,1,1,2,2,6,3,3,2,1,5,7,1,6,2,10,5,2,8,4,2,1,7,6,4,11,2,13,8,2,7,7,4,
%T A387203 7,20,9,11,2,9,8,19,2,6,6,21,20,1,2,2,18,9,9,16,3,21,12,3,12,2,27,11,
%U A387203 10,18,3,34,13,17,2,8,23,12,5,18,2,22,11,24,15,26,15,6,22,27,2,31,4,2
%N A387203 Number of additively indecomposable elements in the real quadratic field Q(sqrt(D)) up to multiplication by totally positive units, where D = A005117(n) is the n-th squarefree number.
%C A387203 For any totally real field K, an additively indecomposable element of K is a totally positive element in the maximal order of K which cannot be written as the sum of two totally positive integral elements of K.  Here, an element x of K is totally positive if all conjugates of x are positive real numbers.
%C A387203 Let K = Q(sqrt(D)) be a real quadratic field. By studying the continued fraction expansion of sqrt(D), Dress and Scharlau classified all additively indecomposable elements of K and showed that every such indecomposable element has its norm bounded by the discriminant of K.
%H A387203 Andreas Dress and Rudolf Scharlau, <a href="https://doi.org/10.1016/0022-314X(82)90064-6">Indecomposable totally positive numbers in real quadratic orders</a>, J. Number Theory 14 (1982), no. 3, 292-306.
%H A387203 Se Wook Jang and Byeong Moon Kim, <a href="https://doi.org/10.1016/j.jnt.2015.06.003">A refinement of the Dress-Scharlau theorem</a>, J. Number Theory 158 (2016), 234-243.
%H A387203 Vítězslav Kala, <a href="https://doi.org/10.1016/j.jnt.2016.02.022">Norms of indecomposable integers in real quadratic fields</a>, J. Number Theory 166 (2016), 193-207.
%H A387203 Vítězslav Kala, <a href="https://doi.org/10.46298/cm.10896">Universal quadratic forms and indecomposables in number fields: a survey</a>, Commun. Math. 31 (2023), no. 2, 81-114.
%H A387203 Magdaléna Tinková and Paul Voutier, <a href="https://doi.org/10.1016/j.jnt.2019.11.005">Indecomposable integers in real quadratic fields</a>, J. Number Theory 212 (2020), 458-482.
%e A387203 For n = 2, every additively indecomposable element in Q(sqrt(A005117(2))) = Q(sqrt(2)) is of the form u or u*(2 + sqrt(2)), for some totally positive unit u. Thus a(2) = 2.
%e A387203 For n = 3, every additively indecomposable element in Q(sqrt(A005117(3))) = Q(sqrt(3)) is a totally positive unit, so a(3) = 1.
%e A387203 For n = 4, every additively indecomposable element in Q(sqrt(A005117(4))) = Q(sqrt(5)) is a totally positive unit, so a(4) = 1.
%e A387203 For n = 5, every additively indecomposable element in Q(sqrt(A005117(5))) = Q(sqrt(6)) is of the form u or u*(3 + sqrt(6)), for some totally positive unit u. Thus a(5) = 2.
%o A387203 (SageMath)
%o A387203 def a(n):
%o A387203     D = [d for d in range(2*n) if Integer(d).is_squarefree()][n-1]
%o A387203     K.<a> = QuadraticField(D); OK = K.ring_of_integers(); ans = 0
%o A387203     if (D%4==1): cf, d = continued_fraction((a-1)/2), (a+1)/2
%o A387203     else: cf, d = continued_fraction(a), a
%o A387203     s = len(cf.period())
%o A387203     ai = [1]+[c.numer() + c.denom()*d for c in cf.convergents()[:2*s+1]]
%o A387203     ind = [ai[i]+t*ai[i+1] for i in range(0,2*s+1,2) for t in range(cf[i+1])]
%o A387203     for i in range(len(ind)):
%o A387203         for j in range(i):
%o A387203             if ((ind[i]/ind[j]) in OK) and (OK(ind[i]/ind[j]).is_unit()): break
%o A387203         else: ans += 1
%o A387203     return ans
%Y A387203 Cf. A005117, A035015, A387207.
%K A387203 nonn,new
%O A387203 2,1
%A A387203 _Robin Visser_, Aug 21 2025