OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..990
FORMULA
a(n) = n*(2*10^(n-1) - 2 + (n+1)*floor(9*10^(n-1)/n))/2.
MATHEMATICA
Table[n*(2*10^(n-1) -2 +(n+1)*Floor[9*10^(n-1)/n])/2, {n, 1, 20}] (* G. C. Greubel, Mar 22 2019 *)
PROG
(PARI) {a(n) = n*(2*10^(n-1) -2 +(n+1)*floor(9*10^(n-1)/n))/2}; \\ G. C. Greubel, Mar 22 2019
(Magma) [n*(2*10^(n-1) -2 +(n+1)*Floor(9*10^(n-1)/n))/2: n in [1..20]]; // G. C. Greubel, Mar 22 2019
(Sage) [n*(2*10^(n-1) -2 +(n+1)*floor(9*10^(n-1)/n))/2 for n in (1..20)] # G. C. Greubel, Mar 22 2019
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Apr 18 2004
EXTENSIONS
Edited and extended by David Wasserman, Mar 26 2007
STATUS
approved