login
Partial sum of Perrin numbers.
0

%I #20 Aug 03 2015 12:27:42

%S 3,3,5,8,10,15,20,27,37,49,66,88,117,156,207,275,365,484,642,851,1128,

%T 1495,1981,2625,3478,4608,6105,8088,10715,14195,18805,24912,33002,

%U 43719,57916,76723,101637,134641,178362,236280,313005,414644,549287,727651,963933,1276940,1691586

%N Partial sum of Perrin numbers.

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

%F a(n)=Perrin(n+5)-2

%F a(n)=r1^(n+5)+r2^(n+5)+r3^(n+5)-2, where r1, r2, r3 are three roots of x^3-x-1=0.

%F G.f.: (3 - x^2)/(1 - x^2 - x^3)/(1-x) = (3 - x^2) / (1 - x - x^2 + x^4). a(n) = a(n-1) + a(n-2) - a(n-4) for n > 2. - Franklin T. Adams-Watters, Aug 05 2011.

%e For n=2, a(2)=Perrin(0)+Perrin(1)+Perrin(2)=3+0+2=5.

%p perrin[0]:=3: perrin[1]:=0: perrin[2]:=2: a[0]:=3: a[1]:=3: a[2]:=5: for n from 0 to 100 do perrin[n]:=perrin[n-2]+perrin[n-3]: a[n]:=a[n-1]+perrin[n]: end do;

%t LinearRecurrence[{0, 1, 1}, {3, 0, 2}, {6, 52}] - 2 (* _Alonso del Arte_, Aug 05 2011, based on Harvey P. Dale's program for A001608 *)

%t LinearRecurrence[{1, 1, 0, -1},{3, 3, 5, 8},47] (* _Ray Chandler_, Aug 03 2015 *)

%Y Cf. A001608.

%K nonn,easy

%O 0,1

%A _Francesco Daddi_, Aug 04 2011