OFFSET
1,1
COMMENTS
Sum_{j=0..3} (a(n)+j)^2 = u(n)*(u(n)+1)/2 = t(u(n)) with A201632(n) = u(n) give the Pell equation c(n)^2 - 32*d(n)^2 = 41. 2*u(n)+1 = c(n) and a(n) + 1.5 = d(n).
Also integers k such that k^2 + (k+1)^2 + (k+2)^2 + (k+3)^2 is equal to a hexagonal number. - Colin Barker, Dec 21 2014
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,34,-34,-1,1).
FORMULA
G.f.: (11*x+17*x^2+22*x^3-x^4-x^5)/((1-x)*(1-34*x^2+x^4)). [corrected by Georg Fischer, May 11 2019]
a(n+4) = 34*a(n-2) - a(n-4) + 48; r=sqrt(2).
a(n+5) = a(n+4) + 34*a(n+3) - 34*a(n+2) - a(n+1) + a(n).
Eigenvalues ej: {1,(3+2r),-(3+2r),(3-2*r),-(3-2*r)}.
a(n+1) = (k1*e1+k2*e2^n+k3*e3^n+k4*e4^n+k5*e5^n)/16 for k1=-24, k2=70+50r, k3=30+21r, k4=70-50r, k5=30-21r.
EXAMPLE
For n=3: a(3)=424; 424^2+425^2+426^2+427^2=724206.
u(3)=A201632(3)=1203; t(1203)=1203*1204/2=724206.
MATHEMATICA
LinearRecurrence[{1, 34, -34, -1, 1}, {11, 28, 424, 1001, 14453}, 30] (* Harvey P. Dale, Apr 16 2013 *)
PROG
(PARI) Vec(x*(x^4+x^3-22*x^2-17*x-11)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)) + O(x^30)) \\ Colin Barker, Dec 21 2014
(Python)
from functools import cache
@cache
def a(n):
if n < 6: return [11, 28, 424, 1001, 14453][n-1]
return a(n-1) + 34*a(n-2) - 34*a(n-3) - a(n-4) + a(n-5)
print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Nov 28 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Weisenhorn, Jan 09 2013
EXTENSIONS
More terms from Colin Barker, Dec 21 2014
STATUS
approved