login
a(n)={binomial[n,(sum of decimal digits of n)] mod (sum of digits of n)}, with n>=1.
0

%I #8 Nov 21 2013 12:49:02

%S 0,1,1,1,1,1,1,1,1,0,1,1,3,2,1,2,6,2,8,0,1,3,4,4,3,3,3,0,2,1,1,1,4,4,

%T 4,4,6,3,4,2,3,4,6,3,5,1,4,8,3,0,4,0,6,6,0,5,0,4,0,4,1,1,7,6,5,4,5,8,

%U 1,3,0,8,6,6,8,5,6,5,4,6,0,0,7,6,6,10,0,3,5,1,3,8,7,7,1,4,2,5,10,0,0,1,3,0

%N a(n)={binomial[n,(sum of decimal digits of n)] mod (sum of digits of n)}, with n>=1.

%p P:=proc(n) local 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; k:=(binomial(i,w) mod w); print(k); od; end: P(100);

%t f[n_]:=Module[{sd=Total[IntegerDigits[n]]},Mod[Binomial[n,sd], sd]]; Array[f,110] (* _Harvey P. Dale_, May 18 2011 *)

%K easy,nonn,base

%O 0,13

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Mar 29 2007