OFFSET
2,1
COMMENTS
This is r(n,2,4) in Alter's notation.
LINKS
R. Alter, Computations and generalizations on a remark of Ramanujan, pp. 182-196 of "Analytic Number Theory (Philadelphia, 1980)", ed. M. I. Knopp, Lect. Notes Math., Vol. 899, 1981. See Table 10, page 193.
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = n + 24 for n >= 8.
EXAMPLE
a(2) = 1105 = 4^2 + 33^2 = 9^2 + 32^2 = 12^2 + 31^2 = 23^2 + 24^2.
a(3) = 129 = 1^2 + 8^2 + 8^2 = 2^2 + 2^2 + 11^2 = 2^2 + 5^2 + 10^2 = 4^2 + 7^2 + 8^2.
MATHEMATICA
LinearRecurrence[{2, -1}, {1105, 129, 52, 53, 36, 37, 32, 33}, 70] (* Harvey P. Dale, Mar 18 2025 *)
PROG
(PARI) a(n)=if(n>7, n+24, [1105, 129, 52, 53, 36, 37][n-1]) \\ Charles R Greathouse IV, May 28 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Apr 04 2021
STATUS
approved
