OFFSET
1,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(8) = 6 because gcd(8,k) divides binomial(8,k) for k=1,2,3,5,6,7 but not k=4 or k=8.
MAPLE
f:= proc(n, m) if binomial(n, m) mod igcd(n, m) = 0 then m else NULL fi end proc:
[seq(nops([seq(f(n, m), m=1..n)]), n=1..200)];
MATHEMATICA
a[n_] := Sum[Boole[Divisible[Binomial[n, k], GCD[n, k]]], {k, 1, n}];
Array[a, 100] (* Jean-François Alcover, Apr 29 2019 *)
PROG
(PARI) a(n) = sum(k=1, n, (binomial(n, k) % gcd(n, k))==0); \\ Michel Marcus, Dec 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Dec 02 2016
STATUS
approved