login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
1

%I #14 Oct 14 2016 12:04:17

%S -1,-1,3,10,19,33,62,125,255,514,1027,2049,4094,8189,16383,32770,

%T 65539,131073,262142,524285,1048575,2097154,4194307,8388609,16777214,

%U 33554429,67108863,134217730,268435459,536870913,1073741822

%N a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).

%C Sequence identical to its third differences.

%H G. C. Greubel, <a href="/A135446/b135446.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3, -3, 2).

%F a(n+1) - 2*a(n) = hexaperiodic 1, 5, 4, -1, -5, -4, A130815.

%F a(n) = 2^n - 2*cos((Pi*n)/3) - (4*sqrt(3)/3)*sin((Pi*n)/3). Or, a(n) = 2^n + [ -2; -3; -1; 2; 3; 1]. - _Richard Choulet_, Dec 31 2007

%F G.f.: (1+x)*(1-3*x) / ( (2*x-1)*(x^2-x+1) ). - _R. J. Mathar_, Nov 07 2015

%t a = {-1, -1, 3}; Do[AppendTo[a, 3*a[[ -1]] - 3*a[[ -2]] + 2*a[[ -3]]], {40}]; a (* _Stefan Steinerberger_, Dec 22 2007 *)

%t LinearRecurrence[{3, -3, 2},{-1, -1, 3},31] (* _Ray Chandler_, Sep 23 2015 *)

%K sign,easy

%O 0,3

%A _Paul Curtz_, Dec 13 2007