A387108 Number of entries in the n-th row of Pascal's triangle not divisible by 25.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 6, 12, 18, 24, 30, 15, 20, 25, 30, 35, 24, 28, 32, 36, 40, 33, 36, 39, 42, 45, 42, 44, 46, 48, 50, 11, 22, 33, 44, 55, 24, 33, 42, 51, 60, 37, 44, 51, 58, 65, 50, 55, 60
Offset: 0
Keywords
Links
- Eric Rowland, The number of nonzero binomial coefficients modulo p^alpha, arXiv:1001.1783 [math.NT]
Programs
-
Python
import re from gmpy2 import digits def A387108(n): s = digits(n,5) n1, n2, n3, n4 = s.count('1'), s.count('2'), s.count('3'), s.count('4') n10, n12, n13, n42, n43, n11 = s.count('10'), s.count('12'), s.count('13'), s.count('42'), s.count('43'), len(re.findall('(?=11)',s)) n20, n21, n23, n30, n22 = s.count('20'), s.count('21'), s.count('23'), s.count('30'), len(re.findall('(?=22)',s)) n31, n32, n40, n41, n33 = s.count('31'), s.count('32'), s.count('40'), s.count('41'), len(re.findall('(?=33)',s)) return ((1440*n10+540*n11+240*n12+90*n13+1920*n20+720*(n21+1)+320*n22+120*n23+2160*n30+810*n31+360*n32+135*n33+2304*n40+864*n41+384*n42+144*n43)*3**n2*5**n4<<(n1+(n3<<1)))//45>>4