login
A224442
Numbers that are the sum of three squares (square 0 allowed) in exactly two ways.
10
9, 17, 18, 25, 26, 27, 29, 33, 34, 36, 38, 45, 49, 51, 53, 57, 59, 61, 62, 68, 69, 72, 73, 75, 77, 82, 83, 85, 94, 97, 100, 102, 104, 105, 106, 107, 108, 109, 116, 118, 123, 130, 132, 136, 138, 139, 141, 144, 147, 152, 154, 155, 157, 158, 165, 177, 180, 187
OFFSET
1,1
COMMENTS
These are the numbers for which A000164(a(n)) = 2.
a(n) is the n-th largest number which has a representation as sum of three integer squares (square 0 allowed), in exactly two ways, if neither the order of terms nor the signs of the numbers to be squared are taken into account. The multiplicity for a(n) with order and signs taken into account is A005875(a(n)).
This sequence is a proper subsequence of A000378.
LINKS
FORMULA
This sequence gives the increasingly ordered elements of the set {m integer | m = a^2 + b^2 + c^2, a, b and c integers with 0 <= a <= b <= c, and m has exactly two such representation}.
The sequence gives the increasingly ordered members of the set {m integer | A000164(m) = 2, m >= 0}.
EXAMPLE
a(1) = 9 = 0^2 + 0^2 + 3^2 = 1^2 + 2^2 + 2^2, and 9 is the smallest number m with A000164(m) = 2 for m >= 0. The multiplicity with order and signs taken into account is 2*3 + 8*3 = 30 = A005875(9).
The two representations [a,b,c] for a(n), n = 1, ..., 10, are
n=1, 9 = [0, 0, 3], [1, 2, 2],
n=2, 17 = [0, 1, 4], [2, 2, 3],
n=3, 18 = [0, 3, 3], [1, 1, 4],
n=4, 25 = [0, 0, 5], [0, 3, 4],
n=5, 26 = [0, 1, 5], [1, 3, 4],
n=6, 27 = [1, 1, 5], [3, 3, 3],
n=7, 29 = [0, 2, 5], [2, 3, 4],
n=8, 33 = [1, 4, 4], [2, 2, 5],
n=9, 34 = [0, 3, 5], [3, 3, 4],
n=10, 36 = [0, 0, 6], [2, 4, 4].
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(t*i^2<n, 0,
`if`(b(n, i-1, t)>2, 3, min(3, b(n, i-1, t)+
`if`(i^2>n, 0, b(n-i^2, i, t-1))))))
end:
a:= proc(n) option remember; local k;
for k from 1 +`if`(n=1, 0, a(n-1))
while b(k, isqrt(k), 3)<>2 do od; k
end:
seq(a(n), n=1..100); # Alois P. Heinz, Apr 09 2013
MATHEMATICA
Select[ Range[0, 200], Length[ PowersRepresentations[#, 3, 2]] == 2 &] (* Jean-François Alcover, Apr 09 2013 *)
CROSSREFS
Cf. A000164, A005875, A000378, A094942 (one way), A224443 (three ways).
Sequence in context: A004751 A134104 A124966 * A343111 A364540 A347250
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Apr 08 2013
STATUS
approved