cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A130835 Sum of all numbers having n or fewer digits and having the sum of their digits equal to n.

This page as a plain text file.
%I A130835 #39 Feb 22 2020 22:59:55
%S A130835 1,33,1110,38885,1399986,51333282,1906666476,71499999285,
%T A130835 2701111108410,102631111100848,3917722222183045,150126888888738762,
%U A130835 5771538888888311735,222499777777775552780,8598259999999991401740,332968856666666633369781,12918171566666666537484951
%N A130835 Sum of all numbers having n or fewer digits and having the sum of their digits equal to n.
%H A130835 Alois P. Heinz, <a href="/A130835/b130835.txt">Table of n, a(n) for n = 1..626</a>
%F A130835 a(n) = (10^n-1)/9 * [x^n] ((x^10-1)/(x-1))^n. - _Alois P. Heinz_, Feb 07 2012
%F A130835 a(n) = A000042(n) * A167403(n) = A002275(n) * A167403(n). - _Alois P. Heinz_, Aug 16 2018
%e A130835 Take n = 3. The numbers to be summed are 111, 3, 30, 300, 210, 201, 120, 102, 21 and 12, which add to 1110.
%p A130835 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
%p A130835 # second Maple program:
%p A130835 b:= proc(n, i) option remember; `if`(n=0, 1,
%p A130835       `if`(i=0, 0, add(b(n-j, i-1), j=0..min(n, 9))))
%p A130835     end:
%p A130835 a:= n-> b(n, n)*(10^n-1)/9:
%p A130835 seq(a(n), n=1..20); # _Alois P. Heinz_, Nov 02 2009
%Y A130835 Cf. A000042, A002275, A007953, A167403, A211072, A331672, A331673.
%K A130835 base,nonn
%O A130835 1,2
%A A130835 _J. M. Bergot_, Jul 18 2007
%E A130835 a(4)-a(6) from _R. J. Mathar_, Aug 01 2007
%E A130835 a(7)-a(12) from _Donovan Johnson_, Jul 02 2009
%E A130835 More terms from _Alois P. Heinz_, Nov 02 2009