%I #29 Mar 21 2021 13:07:13
%S 0,1,1,1,1,0,-2,-5,-9,-13,-15,-12,0,25,65,117,169,196,158,3,-321,-841,
%T -1519,-2200,-2560,-2079,-79,4121,10881,19720,28638,33435,27351,1547,
%U -52895,-140772,-256000,-372775,-436655,-359763,-26871
%N First differences of A014292.
%C Real part of the sequence of complex numbers defined by c(n) = c(n-1) + i*c(n-2) for n > 1, c(0) = 1, c(1) = 1.
%C a(n) = real part of the sequence b of quaternions defined by b(0)=1, b(1)=1, b(n) = b(n-1) + b(n-2)*(0,s,s,s) where s = 1/sqrt(3).
%H Michael De Vlieger, <a href="/A104862/b104862.txt">Table of n, a(n) for n = 0..6285</a>
%F G.f.: Re(1/(1-x-ix^2)) = (1-x)/(1-2x+x^2+x^4). - _Paul Barry_, Apr 25 2005
%F a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*cos(Pi*k/2). - _Paul Barry_, Apr 25 2005
%F a(0)=0, a(1)=1, a(n+1) = a(n) - Sum_{k=0..n-3} a(k). - _Alex Ratushnyak_, May 03 2012
%t Differences@ LinearRecurrence[{2, -1, 0, -1}, {0, 0, 1, 2}, 42] (* _Michael De Vlieger_, Mar 19 2021 *)
%o (Python)
%o a = [0]*1000
%o a[1]=1
%o for n in range(1,55):
%o print(a[n-1], end=", ")
%o s=sum(a[k] for k in range(n-2))
%o a[n+1] = a[n]-s
%o # from _Alex Ratushnyak_, May 03 2012
%Y Cf. A078001, A014292.
%K sign
%O 0,7
%A _Gerald McGarvey_, Apr 24 2005
|