OFFSET
0,1
COMMENTS
For every n=2k the triple (a(2k-1)^2, a(2k)^2 , a(2k+1)^2) is an arithmetic progression, i.e., 2*a(2k)^2 = a(2k-1)^2 + a(2k+1)^2.
In general a triple((x-y)^2,z^2,(x+y)^2) is an arithmetic progression if and only if x^2+y^2=z^2, e.g., (17^2, 53^2, 73^2).
The first differences of this sequence is the interleaved sequence 4,36,20,52,36,68,52,....
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
G.f.: (13-9*x+19*x^2-7*x^3)/((1+x)*(1-x)^3).
a(n) = 4*n*(n+3)+6*(-1)^n+7.
2*a(2n)^2 = a(2n-1)^2 + a(2n+1)^2.
EXAMPLE
a(5) = 2*a(4) - 2*a(2) + a(1) = 2*125 - 2*53 + 17 = 161.
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {13, 17, 53, 73}, 50] (* Paolo Xausa, Feb 22 2024 *)
PROG
(Magma) I:=[13, 17, 53, 73]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..75]];
(Maxima) A214393(n):=4*n*(n+3)+6*(-1)^n+7$
makelist(A214393(n), n, 0, 30); /* Martin Ettl, Nov 01 2012 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yasir Karamelghani Gasmallah, Jul 15 2012
STATUS
approved