login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130835 Sum of all numbers having n or fewer digits and having the sum of their digits equal to n. 2
1, 33, 1110, 38885, 1399986, 51333282, 1906666476, 71499999285, 2701111108410, 102631111100848, 3917722222183045, 150126888888738762, 5771538888888311735, 222499777777775552780, 8598259999999991401740, 332968856666666633369781, 12918171566666666537484951 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..626

FORMULA

a(n) = (10^n-1)/9 * [x^n] ((x^10-1)/(x-1))^n. - Alois P. Heinz, Feb 07 2012

a(n) = A000042(n) * A167403(n) = A002275(n) * A167403(n). - Alois P. Heinz, Aug 16 2018

EXAMPLE

Take n = 3. The numbers to be summed are 111, 3, 30, 300, 210, 201, 120, 102, 21 and 12, which add to 1110.

MAPLE

A007953 := proc(n) add(i, i=convert(n, base, 10)) ; end: A130835 := proc(n) local a, i; a := 0 ; for i from 1 to 10^n-1 do if A007953(i) = n then a := a+i ; fi ; od ; RETURN(a) ; end: seq(A130835(n), n=1..4) ; # R. J. Mathar, Aug 01 2007

# second Maple program:

b:= proc(n, i) option remember; `if`(n=0, 1,

      `if`(i=0, 0, add(b(n-j, i-1), j=0..min(n, 9))))

    end:

a:= n-> b(n, n)*(10^n-1)/9:

seq(a(n), n=1..20); # Alois P. Heinz, Nov 02 2009

CROSSREFS

Cf. A000042, A002275, A167403.

Sequence in context: A009977 A293693 A187539 * A262101 A077420 A158688

Adjacent sequences:  A130832 A130833 A130834 * A130836 A130837 A130838

KEYWORD

base,nonn

AUTHOR

J. M. Bergot, Jul 18 2007

EXTENSIONS

a(4)-a(6) from R. J. Mathar, Aug 01 2007

a(7)-a(12) from Donovan Johnson, Jul 02 2009

More terms from Alois P. Heinz, Nov 02 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 18 11:15 EST 2018. Contains 318219 sequences. (Running on oeis4.)