OFFSET
1,1
COMMENTS
For the first of the corresponding two consecutive positive integers, see A261932.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,18,-18,0,0,-1,1).
FORMULA
G.f.: x*(2*x^8+2*x^7+x^6+2*x^5-27*x^4-26*x^3-9*x^2-10*x-7) / ((x-1)*(x^4-4*x^2-1)*(x^4+4*x^2-1)).
EXAMPLE
7 is in the sequence because 7^2 + 8^2 + ... + 16^2 = 26^2 + 27^2.
MATHEMATICA
LinearRecurrence[{1, 0, 0, 18, -18, 0, 0, -1, 1}, {7, 17, 26, 52, 205, 383, 544, 1010, 3755}, 40] (* Harvey P. Dale, Mar 29 2018 *)
PROG
(PARI) Vec(x*(2*x^8+2*x^7+x^6+2*x^5-27*x^4-26*x^3-9*x^2-10*x-7)/((x-1)*(x^4-4*x^2-1)*(x^4+4*x^2-1)) + O(x^40))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Sep 06 2015
STATUS
approved