OFFSET
1,2
COMMENTS
A075841 gives the corresponding values of sqrt(n^2 + (n+3)^2).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
G.f.: 3*x^2*(x-3) / ((x-1)*(x^2-6*x+1)).
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3).
a(n) = 3*A001652(n-1).
a(n) = -3*(2 + (3-2*sqrt(2))^n*(1+sqrt(2)) - (-1+sqrt(2))*(3+2*sqrt(2))^n) / 4. - Colin Barker, Apr 13 2017
EXAMPLE
9 is in the sequence because 9^2 + 12^2 = 225 = 15^2.
MATHEMATICA
CoefficientList[Series[3 x (x - 3)/((x - 1) (x^2 - 6 x + 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 11 2014 *)
PROG
(PARI) concat(0, Vec(3*x^2*(x-3)/((x-1)*(x^2-6*x+1)) + O(x^100)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Aug 10 2014
STATUS
approved