This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A386952 #12 Aug 17 2025 07:59:29 %S A386952 1,2,3,4,5,6,7,8,9,4,8,12,9,12,15,14,16,18,7,14,21,14,19,24,21,24,27, %T A386952 4,8,12,12,18,24,20,28,36,9,18,27,20,28,36,31,38,45,14,28,42,28,38,48, %U A386952 42,48,54,7,14,21,20,31,42,33,48,63,14,28,42,31,44,57,48 %N A386952 Number of entries in the n-th row of Pascal's triangle not divisible by 9. %H A386952 James G. Huard, Blair K. Spearman, and Kenneth S. Williams, <a href="http://doi.org/10.4064/aa-78-4-331-349">Pascal's triangle (mod 9)</a>, Acta Arithmetica, 78 (1997), 331-349. %o A386952 (Python) %o A386952 import re %o A386952 from gmpy2 import digits %o A386952 def A386952(n): %o A386952 s = digits(n,3) %o A386952 n1 = s.count('1') %o A386952 n2 = s.count('2') %o A386952 n01 = s.count('10') %o A386952 n02 = s.count('20') %o A386952 n11 = len(re.findall('(?=11)',s)) %o A386952 n12 = s.count('21') %o A386952 return ((3*((1+n01<<2)+n11)+((n02<<2)+n12<<2))*3**n2<<n1)//3>>2 %Y A386952 Cf. A001316, A006047, A194459, A382720-A382725. %K A386952 nonn %O A386952 0,2 %A A386952 _Chai Wah Wu_, Aug 10 2025