OFFSET
1,5
COMMENTS
The idea for this sequence comes from the 6th problem of the 2nd day of the 33rd International Mathematical Olympiad in Moscow, 1992 (see link).
There are four cases to examine and three possible values for a(n).
a(n) = 1 iff n is a nonhypotenuse number or iff n is in A004144.
a(n) >= 2 iff n is a hypotenuse number or iff n is in A009003.
a(n) = 2 iff n^2 is the sum of two positive squares but not the sum of three positive squares or iff n^2 is in A309779.
a(n) = n^2 - 14 iff n^2 is the sum of two and three positive squares or iff n^2 is in A231632.
REFERENCES
Marcin E. Kuczma, International Mathematical Olympiads, 1986-1999, The Mathematical Association of America, 2003, pages 76-79.
LINKS
IMO, 1992, Moscow, Second day. Problem 6
EXAMPLE
1 = 1^2, 4 = 2^2 and a(1) = a(2) = 1.
25 = 5^2 = 3^2 + 4^2 and a(5) = 2.
The first representations of 169 are 13^2 = 12^2 + 5^2 = 12^2 + 4^2 + 3^2 = 11^2 + 4^2 + 4^2 + 4^2 = 6^2 + 6^2 + 6^2 + 6^2 + 5^2 = 6^2 + 6^2 + 6^2 + 6^2 + 4^2 + 3^2 = ... and a(13) = 13^2 - 14 = 155.
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Aug 17 2019
STATUS
approved