A223730 Multiplicities for representations of positive numbers n as primitive sums of three nonzero squares.
0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 1, 0, 0, 2, 0, 0, 2, 1, 1, 0, 1, 1, 0, 0, 1, 1, 2, 0, 1, 2, 0, 0, 2, 0, 2, 0, 1, 2, 0, 0, 1, 3, 1, 0, 2, 1, 0, 0, 1, 2, 1, 0, 2, 1, 0, 0, 2, 1, 2, 0, 0, 3, 0, 0, 3, 2, 1, 0, 1, 2, 0, 0, 1, 2, 2, 0, 3, 2, 0, 0, 2, 1, 2, 0, 1, 3, 0, 0, 2, 3, 1, 0, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 0, 0, 4, 0, 3, 0, 1, 4
Offset: 1
Keywords
Examples
a(12) = 0 because the only representation of 12 as a sum of three nonzero squares is given by [2,2,2], i.e., 12 = 2^2 + 2^2 + 2^2, but this is not a primitive sum because gcd(2,2,2) = 2, not 1. Such a situation appears for n = 12, 24, 36, 44, 48, 56, 68, 72, 76, 84, 88, 96, ... For these numbers A025427(n) = 1 and a(n) = 0. a(27) = 1 because the only primitive representation of 27 as a sum of three nonzero squares is denoted by [1,1,5]. The representation [3,3,3] is not primitive.
References
- E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- F. Halter-Koch, Darstellung natürlicher Zahlen als Summe von Quadraten, Acta Arith. 42 (1982) 11-20.
Programs
-
Maple
with(numtheory): b:= proc(n, i, t, s) option remember; `if`(n=0, `if`(t=0 and s={}, 1, 0), `if`(i=1, `if`(t=n, 1, 0), `if`(t*i^2
xn, 0, b(n-i^2, i, t-1, `if`(s={1}, factorset(i), s intersect factorset(i))))))) end: a:= n-> b(n, isqrt(n), 3, {1}): seq(a(n), n=1..200); # Alois P. Heinz, Apr 06 2013 -
Mathematica
a[n_] := Select[ PowersRepresentations[n, 3, 2], Times @@ # != 0 && GCD @@ # == 1 &] // Length; Table[a[n], {n, 1, 134}] (* Jean-François Alcover, Jun 21 2013 *)
Formula
a(n) = 0 if there is no representation of n as a primitive sum of three nonzero squares. a(n) = k >= 1 if there are k distinct such representations for n.
Comments