OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5) = {6+7+8+9}-{4+3+2+1}=20.
MATHEMATICA
Do[Print[Sum[i, { i, n + 1, 10^( Length[IntegerDigits[ n]]) - 1}] - Sum[i, {i, 10^(Length[IntegerDigits[n]] - 1), n - 1}]], {n, 1, 50}] (Poff)
skdn[n_]:=Total[Range[n+1, 10^IntegerLength[n]-1]]-Total[Range[ 10^ (IntegerLength[ n]-1), n-1]]; Array[skdn, 50] (* Harvey P. Dale, Sep 27 2020 *)
CROSSREFS
KEYWORD
base,sign
AUTHOR
Amarnath Murthy, Aug 04 2005
EXTENSIONS
Corrected and extended by Tracy Poff (tracy.poff(AT)gmail.com), Dec 31 2005
STATUS
approved