login
a(n) = binomial(n, sum_digits_n).
2

%I #21 Apr 24 2019 17:40:37

%S 1,1,1,1,1,1,1,1,1,1,10,55,220,715,2002,5005,11440,24310,48620,92378,

%T 190,1330,7315,33649,134596,480700,1562275,4686825,13123110,34597290,

%U 4060,31465,201376,1107568,5379616,23535820,94143280,348330136,1203322288

%N a(n) = binomial(n, sum_digits_n).

%H Seiichi Manyama, <a href="/A128936/b128936.txt">Table of n, a(n) for n = 0..10000</a> (terms 1..1000 from G. C. Greubel)

%e a(12) = binomial(12,3) = 220.

%p P:=proc(n) local a,i,k,w; for i from 1 by 1 to n do w:=0;k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=binomial(i,w); print(a); od; end: P(100);

%p a:=proc(n) local nn, s: nn:=convert(n,base,10): s:=sum(nn[j],j=1..nops(nn)): binomial(n,s): end: seq(a(n),n=0..38); # _Emeric Deutsch_, May 04 2007

%t Table[Binomial[n, Total[IntegerDigits[n]]], {n, 1, 40}] (* _G. C. Greubel_, Feb 10 2019 *)

%o (PARI) a(n) = binomial(n, sumdigits(n)); \\ _Michel Marcus_, Feb 10 2019

%o (Sage) [binomial(n, sum(int(d) for d in str(n))) for n in (1..40)] # _G. C. Greubel_, Feb 10 2019

%Y Cf. A007953.

%K nonn,base

%O 0,11

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Apr 27 2007

%E a(0)=1 prepended by _Seiichi Manyama_, Apr 24 2019