A262689 a(n) = largest number k <= A000196(n) for which A002828(n-(k^2)) = A002828(n)-1.
0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 4, 7, 7, 7, 6, 7, 7, 7, 6, 7, 7, 7, 7, 6, 7, 7, 8, 8, 8, 7, 8, 8, 6, 7, 6, 8, 7, 7, 6, 8, 7, 7, 8, 9, 9, 9, 8, 9, 9, 9, 6, 8, 9, 9, 9, 8, 9, 9, 8, 9, 7, 9, 10, 10, 10, 10, 10, 10, 9, 9, 10, 10, 10, 10, 10, 8, 8, 9, 10, 9, 10, 10, 10, 11
Offset: 0
Keywords
Examples
For n = 9, we have A002828(9) = 1 because 9 is itself a perfect square. By the definition of this sequence, we find the largest k <= 3 for which A002828(9 - k^2) = A002828(9)-1 = 0, and it is k=3 that satisfies this condition, thus a(9) = 3. For n = 27, by the other interpretation given in the Comments section, we see that the two minimal sums requiring the least number of squares (= 3 = A002828(27)) are (25 + 1 + 1) and (9 + 9 + 9). As 25 is larger than 9, we have a(27) = sqrt(25) = 5. For n = 33, the two minimal solutions are (25 + 4 + 4) and (16 + 16 + 1). As 25 is larger than 16, we have a(33) = sqrt(25) = 5.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65536
Comments