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.

A263850 Let R = Z[(1+sqrt(5))/2] denote the ring of integers in the real quadratic number field of discriminant 5. Then a(n) is the largest integer k such that every totally positive element of norm n in R can be written as a sum of three squares in R in at least k ways, or 0 if there is no totally positive element of norm n.

Original entry on oeis.org

1, 6, 0, 0, 12, 24, 0, 0, 0, 32, 0, 24, 0, 0, 0, 0, 54, 0, 0, 24, 24, 0, 0, 0, 0, 30, 0, 0, 0, 24, 0, 48, 0, 0, 0, 0, 48, 0, 0, 0, 0, 96, 0, 0, 24, 48, 0, 0, 0, 96, 0, 0, 0, 0, 0, 48, 0, 0, 0, 24, 0, 120, 0, 0, 108, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 72, 0, 0, 48, 120, 54, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Nov 18 2015

Keywords

Comments

The terms were computed with the aid of Magma by David Durstoff, Nov 11 2015. See A263849 for further information.
Note that there are examples of totally positive elements x and y in R which have the same norm, but for which the number of ways of writing x as a sum of three squares in R is different to the number of ways of writing y as a sum of three squares in R. See A263849 for explicit examples. - Robin Visser, Mar 28 2025

References

  • Maass, Hans. Über die Darstellung total positiver Zahlen des Körpers R (sqrt(5)) als Summe von drei Quadraten, Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg. Vol. 14. No. 1, pp. 185-191, 1941.

Crossrefs

Cf. A263849 (another version of this sequence), A031363, A035187.
Cf. A005875 (sum of 3 squares in Z), A000118 (sum of 4 squares in Z).

Programs

  • Sage
    import itertools
    def a(n):
        if n==0: return 1
        if any([((r[0]%5 in [2,3]) and (r[1]%2==1)) for r in factor(n)]): return 0
        K. = NumberField(x^2-x-1); cw = w.coordinates_in_terms_of_powers(); ans = []
        for idl in K.ideals_of_bdd_norm(n)[n]:
            for u in [1,-1,w,-w]:
                X,Y = cw(u*idl.gens_reduced()[0]); num = 0
                if (X < 0): continue
                for b in range(-isqrt(X), isqrt(X)+1):
                    for d in range(-isqrt(X-b^2), isqrt(X-b^2)+1):
                        for f in range(-isqrt(X-b^2-d^2), isqrt(X-b^2-d^2)+1):
                            S = b^2+d^2+f^2; M = isqrt(X-S);
                            for (a,c,e) in itertools.product(range(-M, M+1), repeat=3):
                                if (a^2+c^2+e^2+S==X) and (2*(a*b+c*d+e*f)+S==Y): num += 1
                if (num > 0): ans.append(num)
        return min(ans)  # Robin Visser, Mar 28 2025