OFFSET
1,3
LINKS
Bruno Berselli, Table of n, a(n) for n = 1..1000
Mircea Merca, Inequalities and Identities Involving Sums of Integer Functions J. Integer Sequences, Vol. 14 (2011), Article 11.9.1.
Index entries for linear recurrences with constant coefficients, signature (9,-7,-9,8).
FORMULA
7*a(n) = round((32*8^n - 126*n - 81)/252).
7*a(n) = floor((16*8^n - 63*n - 16)/126).
7*a(n) = ceiling((16*8^n - 63*n - 65)/126).
7*a(n) = round((16*8^n - 63*n - 16)/126).
a(n) = a(n-2) + (8^(n-1) - 1)/7, n > 2.
a(n) = 9*a(n-1) - 7*a(n-2) - 9*a(n-3) + 8*a(n-4), n > 4.
G.f.: x^2/((1+x)*(1-8*x)*(1-x)^2).
7*a(n) = (32*8^n - 126*n - 81 + 49*(-1)^n)/252. - Bruno Berselli, Jan 19 2011
a(n) = (floor(8^(n+1)/63) - floor((n+1)/2))/7. - Seiichi Manyama, Dec 22 2023
EXAMPLE
a(3) = (1/7)*(floor(8/9) + floor(64/9) + floor(512/9)) = (1/7)*(0 + 7 + 56) = (1/7)*63 = 9.
MAPLE
A178827 := proc(n) add( floor(8^i/9)/7, i=0..n) ; end proc:
MATHEMATICA
Rest[CoefficientList[Series[x^2/((1+x)*(1-8*x)*(1-x)^2), {x, 0, 30}], x]] (* G. C. Greubel, Jan 22 2019 *)
PROG
(Magma) [ &+[Floor(8^k/9)/7: k in [1..n]]: n in [1..25] ]; // Bruno Berselli, Apr 28 2011
(Decimal BASIC)
FOR n=1 TO 1000
PRINT n; (32*8^n-126*n-81+49*(-1)^n)/1764
NEXT n
END ! Bruno Berselli, Apr 28 2011
(PARI) my(x='x+O('x^30)); concat([0], Vec(x^2/((1+x)*(1-8*x)*(1-x)^2))) \\ G. C. Greubel, Jan 22 2019
(Sage) a=(x^2/((1+x)*(1-8*x)*(1-x)^2)).series(x, 30).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jan 22 2019
(GAP) a:=[0, 1, 9, 74];; for n in [5..30] do a[n]:=9*a[n-1]-7*a[n-2]-9*a[n-3] +8*a[n-4]; od; a; # G. C. Greubel, Jan 22 2019
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Mircea Merca, Dec 27 2010
STATUS
approved