A130487 a(n) = Sum_{k=0..n} (k mod 9) (Partial sums of A010878).
0, 1, 3, 6, 10, 15, 21, 28, 36, 36, 37, 39, 42, 46, 51, 57, 64, 72, 72, 73, 75, 78, 82, 87, 93, 100, 108, 108, 109, 111, 114, 118, 123, 129, 136, 144, 144, 145, 147, 150, 154, 159, 165, 172, 180, 180, 181, 183, 186, 190, 195, 201, 208, 216, 216, 217, 219, 222, 226
Offset: 0
Links
- Shawn A. Broyles, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,1,-1).
Crossrefs
Programs
-
GAP
a:=[0,1,3,6,10,15,21,28,36,36];; for n in [11..71] do a[n]:=a[n-1]+a[n-9]-a[n-10]; od; a; # G. C. Greubel, Aug 31 2019
-
Magma
I:=[0,1,3,6,10,15,21,28,36,36]; [n le 10 select I[n] else Self(n-1) + Self(n-9) - Self(n-10): n in [1..71]]; // G. C. Greubel, Aug 31 2019
-
Maple
seq(coeff(series(x*(1-9*x^8+8*x^9)/((1-x^9)*(1-x)^3), x, n+1), x, n), n = 0 .. 70); # G. C. Greubel, Aug 31 2019
-
Mathematica
Accumulate[PadRight[{},120,Range[0,8]]] (* Harvey P. Dale, Dec 19 2018 *) Accumulate[Mod[Range[0,100],9]] (* Harvey P. Dale, Oct 16 2021 *)
-
PARI
a(n) = sum(k=0, n, k % 9); \\ Michel Marcus, Apr 28 2018
-
Sage
def A130487_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P(x*(1-9*x^8+8*x^9)/((1-x^9)*(1-x)^3)).list() A130487_list(70) # G. C. Greubel, Aug 31 2019
Comments