A385552 Period of {binomial(N,n) mod 5: N in Z}.
1, 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125
Offset: 0
Examples
For N == 0, 1, ..., 24 (mod 5), binomial(N,5) == {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4} (mod 5).
Links
- Jianing Song, Table of n, a(n) for n = 0..625
- Wikipedia, Lucas's theorem
Crossrefs
Programs
-
PARI
a(n) = if(n, 5^(logint(n,5)+1), 1)
-
Python
from sympy import integer_log def A385552(n): return 5*5**(integer_log(n,5)[0]) if n else 1 # Chai Wah Wu, Jul 06 2025
Comments