login
Partial sums of round(3^n/10).
1

%I #57 Sep 08 2022 08:45:53

%S 0,0,1,4,12,36,109,328,984,2952,8857,26572,79716,239148,717445,

%T 2152336,6457008,19371024,58113073,174339220,523017660,1569052980,

%U 4707158941,14121476824,42364430472,127093291416

%N Partial sums of round(3^n/10).

%H Vincenzo Librandi, <a href="/A177881/b177881.txt">Table of n, a(n) for n = 0..1000</a>

%H Mircea Merca, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL14/Merca/merca3.html">Inequalities and Identities Involving Sums of Integer Functions</a> J. Integer Sequences, Vol. 14 (2011), Article 11.9.1.

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

%F G.f.: x^2/((1 - x)*(1 - 3*x)*(1 + x^2)).

%F a(n) = round((3*3^n - 3)/20) = round((3*3^n - 5)/20).

%F a(n) = floor((3*3^n - 1)/20).

%F a(n) = ceiling((3*3^n - 9)/20).

%F a(n) = a(n-4) + 4*3^(n-3), n > 3.

%F a(n) = 4*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4), n > 3.

%F a(n) = (3^(n+1) + (3 - (-1)^n)*i^(n*(n+1)) - 5)/20, where i = sqrt(-1) - _Bruno Berselli_, May 12 2021

%e a(4) = 0 + 0 + 1 + 3 + 8 = 12.

%p A177881 := proc(n) add( round(3^i/10),i=0..n) ; end proc:

%t Table[(3^(n + 1) + (3 - (-1)^n) i^(n (n + 1)) - 5)/20, {n, 0, 25}] (* _Bruno Berselli_, May 12 2021 *)

%o (Magma) [Round((3*3^n-3)/20): n in [0..30]]; // _Vincenzo Librandi_, Jun 23 2011

%o (PARI) a(n)=(3^(n+1)-1)\20 \\ _Charles R Greathouse IV_, Jun 23 2011

%Y Cf. A015577 (bisection of round(3^n/10)).

%K nonn,less,easy

%O 0,4

%A _Mircea Merca_, Dec 28 2010