A130488 a(n) = Sum_{k=0..n} (k mod 10) (Partial sums of A010879).
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 90, 91, 93, 96, 100, 105, 111, 118, 126, 135, 135, 136, 138, 141, 145, 150, 156, 163, 171, 180, 180, 181, 183, 186, 190, 195, 201, 208, 216, 225, 225, 226, 228, 231, 235, 240, 246, 253
Offset: 0
Keywords
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,0,1,-1).
Crossrefs
Programs
-
GAP
a:=[0,1,3,6,10,15,21,28,36,45,45];; for n in [12..61] do a[n]:=a[n-1]+a[n-10]-a[n-11]; od; a; # G. C. Greubel, Aug 31 2019
-
Magma
I:=[0,1,3,6,10,15,21,28,36,45,45]; [n le 11 select I[n] else Self(n-1) + Self(n-10) - Self(n-11): n in [1..61]]; // G. C. Greubel, Aug 31 2019
-
Maple
seq(coeff(series(x*(1-10*x^9+9*x^10)/((1-x^10)*(1-x)^3), x, n+1), x, n), n = 0..60); # G. C. Greubel, Aug 31 2019
-
Mathematica
LinearRecurrence[{1,0,0,0,0,0,0,0,0,1,-1}, {0,1,3,6,10,15,21,28,36,45, 45}, 60] (* G. C. Greubel, Aug 31 2019 *)
-
PARI
a(n) = sum(k=0, n, k % 10); \\ Michel Marcus, Apr 28 2018
-
Python
def A130488(n): a, b = divmod(n,10) return 45*a+(b*(b+1)>>1) # Chai Wah Wu, Jul 27 2022
-
Sage
def A130488_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P(x*(1-10*x^9+9*x^10)/((1-x^10)*(1-x)^3)).list() A130488_list(60) # G. C. Greubel, Aug 31 2019
Comments