%I #19 Apr 20 2023 02:10:09
%S 0,1,6,22,64,164,392,904,2048,4592,10208,22496,49152,106560,229504,
%T 491648,1048576,2227968,4718080,9960960,20971520,44041216,92276736,
%U 192940032,402653184,838856704,1744822272,3623870464,7516192768
%N a(n) = n*2^n - 2^(n/2)*sin(Pi*n/4).
%C Related to binomial transform of A002265. Sequence is identical to its fourth differences (cf. A139756, A137221). See also A097064, A135035, A038504, A135356. - _Paul Curtz_, Jun 18 2008
%H G. C. Greubel, <a href="/A099855/b099855.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (6,-14,16,-8).
%F G.f.: x/((1-2*x+2*x^2)*(1-4*x+4*x^2)).
%F a(n) = Sum_{k=0..n} 2^(k/2)*sin(Pi*k/4)*2^(n-k)*(n-k+1).
%F a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4).
%F a(n) = 2*A001787(n) - A009545(n).
%t LinearRecurrence[{6,-14,16,-8},{0,1,6,22},30] (* _Harvey P. Dale_, Mar 22 2018 *)
%o (Magma) I:=[0,1,6,22]; [n le 4 select I[n] else 6*Self(n-1) -14*Self(n-2) +16*Self(n-3) -8*Self(n-4): n in [1..51]]; // _G. C. Greubel_, Apr 20 2023
%o (SageMath)
%o @CachedFunction
%o def a(n): # a = A099855
%o if (n<5): return (0,1,6,22,64)[n]
%o else: return 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4)
%o [a(n) for n in range(51)] # _G. C. Greubel_, Apr 20 2023
%Y Cf. A001787, A002265, A009545, A038504, A097064, A135035, A135356.
%Y Cf. A137221, A139756.
%Y Binomial transform of A047538.
%K easy,nonn
%O 0,3
%A _Paul Barry_, Oct 28 2004