OFFSET
1,1
COMMENTS
For the first of the corresponding nine consecutive positive integers, see A262141.
LINKS
Colin Barker, Table of n, a(n) for n = 1..632
Index entries for linear recurrences with constant coefficients, signature (39,-39,1).
FORMULA
a(n) = 39*a(n-1)-39*a(n-2)+a(n-3) for n>3.
G.f.: 9*x*(x-19) / ((x-1)*(x^2-38*x+1)).
a(n) = 3*(-6-(-3+sqrt(10))*(19+6*sqrt(10))^(-n)+(3+sqrt(10))*(19+6*sqrt(10))^n)/4. - Colin Barker, Mar 03 2016
EXAMPLE
171 is in the sequence because 171^2 + ... + 180^2 = 308085 = 181^2 + ... + 189^2.
MATHEMATICA
LinearRecurrence[{39, -39, 1}, {171, 6660, 253071}, 30] (* Harvey P. Dale, Sep 26 2015 *)
PROG
(PARI) Vec(9*x*(x-19)/((x-1)*(x^2-38*x+1)) + O(x^30))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Sep 12 2015
STATUS
approved