login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A109644
{Sum of all k-digit numbers > n }-{sum of all k-digit numbers < n}, n is a 'k'digit number.
1
44, 41, 36, 29, 20, 9, -4, -19, -36, 4895, 4874, 4851, 4826, 4799, 4770, 4739, 4706, 4671, 4634, 4595, 4554, 4511, 4466, 4419, 4370, 4319, 4266, 4211, 4154, 4095, 4034, 3971, 3906, 3839, 3770, 3699, 3626, 3551, 3474, 3395, 3314, 3231, 3146, 3059, 2970, 2879, 2786, 2691, 2594, 2495
OFFSET
1,1
LINKS
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
Sequence in context: A108213 A158376 A036182 * A165865 A239534 A171906
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