login
Partial sums of floor(3^n/7).
1

%I #33 Sep 08 2022 08:45:54

%S 0,0,1,4,15,49,153,465,1402,4213,12648,37954,113874,341634,1024915,

%T 3074758,9224289,27672883,83018667,249056019,747168076,2241504247,

%U 6724512762,20173538308,60520614948,181561844868

%N Partial sums of floor(3^n/7).

%H Vincenzo Librandi, <a href="/A178704/b178704.txt">Table of n, a(n) for n = 0..700</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_06">Index entries for linear recurrences with constant coefficients</a>, signature (5,-7,2,5,-7,3).

%F a(n) = round((6*3^n - 14*n - 7)/28).

%F a(n) = floor((6*3^n - 14*n + 2)/28).

%F a(n) = ceiling((6*3^n - 14*n - 16)/28).

%F a(n) = round((6*3^n - 14*n - 6)/28).

%F a(n) = a(n-6) + 52*3^(n-5) - 3, n > 5.

%F a(n) = 5*a(n-1) - 7*a(n-2) + 2*a(n-3) + 5*a(n-4) - 7*a(n-5) + 3*a(n-6).

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

%e a(6) = 0 + 0 + 1 + 3 + 11 + 34 + 104 = 153.

%p A178704 := proc(n) add( floor(3^i/7),i=0..n) ; end proc:

%t Table[Floor[(6*3^n-14*n+2)/28], {n,0,30}] (* _G. C. Greubel_, Jan 25 2019 *)

%o (Magma) [Round((6*3^n-14*n-7)/28): n in [0..30]]; // _Vincenzo Librandi_, Jun 21 2011

%o (PARI) vector(30, n, n--; ((6*3^n-14*n+2)/28)\1) \\ _G. C. Greubel_, Jan 25 2019

%o (Sage) [floor((6*3^n-14*n+2)/28) for n in (0..30)] # _G. C. Greubel_, Jan 25 2019

%K nonn,less

%O 0,4

%A _Mircea Merca_, Dec 26 2010