OFFSET
0,4
COMMENTS
Partial sums of (1/4)*floor(5^n/6) = (1/3)*floor(5^n/8). - Mircea Merca, Dec 27 2010
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-4,-6,5).
FORMULA
a(n) = 5^(n+1)/96 -n/8 -3/32 +(-1)^n/24. - R. J. Mathar, Jan 08 2011
G.f.: x^2/((1-x)*(1-5*x)*(1-x^2)).
a(n) = 6*a(n-1) - 4*a(n-2) - 6*a(n-3) + 5*a(n-4).
a(n) = Sum_{k=0..n} floor((n-k)/2)*4^k = Sum_{k=0..n} floor(k/2)*4^(n-k).
From Mircea Merca, Dec 27 2010: (Start)
4*a(n) = round((5*5^n-12*n-9)/24) = floor((5*5^n-12*n-5)/24) = ceiling((5*5^n-12*n-13)/24) = round((5*5^n-12*n-5)/24).
a(n) = a(n-2) + (5^(n-1)-1)/4, n>1. (End)
a(n) = (floor(5^(n+1)/24) - floor((n+1)/2))/4. - Seiichi Manyama, Dec 22 2023
MAPLE
A097139 := proc(n) 5^(n+1)/96 -n/8 -3/32 +(-1)^n/24 ; end proc: # R. J. Mathar, Jan 08 2011
MATHEMATICA
f[n_] := Floor[5^n/6]/4; Accumulate@ Array[f, 24, 0]
a[n_] := a[n] = 6 a[n - 1] - 4 a[n - 2] - 6 a[n - 3] + 5 a[n - 4]; a[0] = a[1] = 0; a[2] = 1; a[3] = 6; Array[a, 24, 0]
CoefficientList[ Series[x^2/((1 - x) (1 - 5 x) (1 - x^2)), {x, 0, 23}], x] (* Robert G. Wilson v, Jan 02 2011 *)
LinearRecurrence[{6, -4, -6, 5}, {0, 0, 1, 6}, 30] (* Harvey P. Dale, Mar 16 2019 *)
PROG
(Magma) [5^(n+1)/96 -n/8 -3/32 +(-1)^n/24: n in [0..30]]; // Vincenzo Librandi, Jun 25 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 29 2004
STATUS
approved