login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A127318
a(n)={binomial[n,(sum of decimal digits of n)] mod (sum of digits of n)}, with n>=1.
0
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, 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, 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
OFFSET
0,13
MAPLE
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);
MATHEMATICA
f[n_]:=Module[{sd=Total[IntegerDigits[n]]}, Mod[Binomial[n, sd], sd]]; Array[f, 110] (* Harvey P. Dale, May 18 2011 *)
CROSSREFS
Sequence in context: A230120 A360872 A136531 * A362689 A349930 A274512
KEYWORD
easy,nonn,base
AUTHOR
STATUS
approved