Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A130835
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A130835 Sum of all numbers having n or fewer digits and having the sum of their digits equal to n. +0
2
1, 33, 1110, 38885, 1399986, 51333282, 1906666476, 71499999285, 2701111108410, 102631111100848, 3917722222183045, 150126888888738762, 5771538888888311735, 222499777777775552780, 8598259999999991401740 (list; graph; listen)
OFFSET

1,2

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 (mathar(AT)strw.leidenuniv.nl), Aug 01 2007

b:= proc(n, i) option remember; if n<0 or i<0 then 0 elif i=0 then `if` (n=0, 1, 0) elif n=0 then 1 else add (b(n-k, i-1), k=0..9) fi end: a:= n-> b(n, n) *(10^n-1) /9: seq (a(n), n=1..20); [From Alois P. Heinz (heinz(AT)hs-heilbronn.de), Nov 02 2009]

CROSSREFS

Sequence in context: A159675 A132469 A009977 this_sequence A077420 A158688 A065424

Adjacent sequences: A130832 A130833 A130834 this_sequence A130836 A130837 A130838

KEYWORD

base,nonn,new

AUTHOR

J. M. Bergot (thekingfishb(AT)yahoo.ca), Jul 18 2007

EXTENSIONS

a(4)-a(6) from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 01 2007

a(7)-a(12) from Donovan Johnson (donovan.johnson(AT)yahoo.com), Jul 02 2009

More terms from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Nov 02 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 14:49 EST 2009. Contains 167514 sequences.


AT&T Labs Research