login
A386279
Number of values between 0 and n-1 which never appear in the sequence {b(m), m>0}, defined by b(m) = binomial(m+n,n) mod n.
0
0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 6, 6, 0, 0, 8, 0, 12, 6, 10, 0, 8, 0, 12, 0, 16, 0, 0, 0, 0, 12, 16, 20, 0, 0, 18, 12, 0, 0, 30, 0, 24, 0, 22, 0, 0, 0, 24, 18, 32, 0, 24, 30, 0, 18, 28, 0, 28, 0, 30, 14, 0, 20, 42, 0, 40, 24, 28, 0, 32, 0, 36, 30, 44, 42, 58, 0, 0, 0, 40
OFFSET
1,6
COMMENTS
The sequence {b(m), m>0} is always periodic (see A133900 and A133910), so one need only compute the first period to find a(n).
a(n) can be arbitrarily large.
a(n)/n can be arbitrarily close to 1.
The natural density of n such that a(n)>0, assuming it exists, is greater or equal to log(2).
a(n) is always even.
FORMULA
a(n) = 0 if n is prime or a power of a prime.
a(2p) = p-1 if p>2 is prime.
EXAMPLE
For n = 3, the sequence {b(m), m>0} (see A133873) has all three residues, 0, 1, and 2, so a(3)=0.
For n = 6, the sequence {b(m), m>0} (see A133886) does not have the residues 2 and 5, so a(6)=2.
PROG
(PARI) a(n) = my(f=factor(n)); for (k=1, #f~, f[k, 2] += logint(n, f[k, 1])); my(nb=factorback(f), v=vector(nb, k, binomial(k+n, n) % n)); n - #Set(v); \\ Michel Marcus, Oct 13 2025
KEYWORD
nonn
AUTHOR
Hari Rajesh, Oct 12 2025
STATUS
approved