OFFSET
0,1
COMMENTS
The elements of this sequence satisfy the property that 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 : in the case of this sequence 7^2, 17^2, and 23^2 is such a triple (i.e. 15-8 =7, 17, 8+15=23, and 8^2+15^2=17^2) .
The first differences of such a sequence is always an interleaved sequence; in this case the interleaved sequence is 2,10,6,14,10,... (A142954).
LINKS
Guenther Schrack, Table of n, a(n) for n = 0..10001
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n+1)-a(n) = A142954(n+1).
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
G.f.: (x^3-3*x^2+3*x-5)/((x-1)^3*(x+1)).
a(n) = (2*n*(n+4)+3*(-1)^n+7)/2.
2*a(2n)^2 = a(2n-1)^2 + a(2n+1)^2.
a(n) = 4*(n+1) + a(n-2) for n > 1; a(-n) = a(n-4). - Guenther Schrack, Oct 24 2018
E.g.f.: (5 + 5*x + x^2)*cosh(x) + (2 + 5*x + x^2)*sinh(x). - Stefano Spezia, Feb 22 2024
EXAMPLE
For n = 7, a(7)=2*a(6)-2*a(4)+a(3)=2*65-2*37+23=79
MAPLE
seq(coeff(series((x^3-3*x^2+3*x-5)/((x-1)^3*(x+1)), x, n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Oct 26 2018
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {5, 7, 17, 23}, 50] (* Harvey P. Dale, Apr 02 2018 *)
PROG
(Magma) I:=[5, 7, 17, 23]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..75]];
(Maxima) A214345(n):=(2*n*(n+4)+3*(-1)^n+7)/2$
makelist(A214345(n), n, 0, 30); /* Martin Ettl, Nov 01 2012 */
(GAP) a:=[7, 17];; for n in [3..50] do a[n]:=4*(n+1)+a[n-2]; od; Concatenation([5], a); # Muniru A Asiru, Oct 26 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yasir Karamelghani Gasmallah, Jul 13 2012
STATUS
approved