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

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

%S 0,1,1,1,1,1,1,1,1,0,0,4,0,0,10,0,0,2,0,10,7,11,0,4,0,13,3,14,0,10,0,

%T 0,22,0,0,4,0,0,13,30,0,28,0,11,5,23,0,20,0,10,34,0,0,6,0,0,0,0,0,40,

%U 0,31,7,32,0,22,0,0,46,10,0,8,0,0,50,0,55,26,0,30,9,0,0,42,0,0,0,11,0,10,0,0

%N a(n)={binomial[n,(sum of decimal digits of n)] mod 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 i); print(k); od; end: P(100);

%t Table[Mod[Binomial[n,Total[IntegerDigits[n]]],n],{n,100}] (* _Harvey P. Dale_, Dec 19 2011 *)

%K easy,nonn,base

%O 0,12

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