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 A249733 #34 Jul 24 2025 20:48:37 %S A249733 0,0,0,0,0,0,0,0,0,6,3,0,4,2,0,2,1,0,12,6,0,8,4,0,4,2,0,24,21,18,19, %T A249733 14,9,14,7,0,28,20,12,20,13,6,12,6,0,32,19,6,21,12,3,10,5,0,48,42,36, %U A249733 38,28,18,28,14,0,50,37,24,36,24,12,22,11,0,52,32,12,34,20,6,16,8,0 %N A249733 Number of (not necessarily distinct) multiples of 9 on row n of Pascal's triangle. %C A249733 Number of zeros on row n of A095143 (Pascal's triangle reduced modulo 9). %C A249733 This should have a formula. See for example A062296, A006047 and A048967. %H A249733 Antti Karttunen, <a href="/A249733/b249733.txt">Table of n, a(n) for n = 0..6561</a> %H A249733 James G. Huard, Blair K. Spearman and Kenneth S. Williams, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa78/aa7843.pdf">Pascal's triangle (mod 9)</a>, Acta Arithmetica (1997), Volume: 78, Issue: 4, page 331-349. %F A249733 For all n >= 0, the following holds: %F A249733 a(n) <= A048277(n). %F A249733 a(n) <= A062296(n). %F A249733 a(2*A249719(n)) > 0 and a((2*A249719(n))-1) > 0. %F A249733 a(n) is odd if and only if n is one of the terms of A249720. %e A249733 Row 9 of Pascal's triangle is {1, 9, 36, 84, 126, 126, 84, 36, 9, 1}. The terms 9, 36, and 126 are the only multiples of nine, and each of them occurs two times on that row, thus a(9) = 2*3 = 6. %e A249733 Row 10 of Pascal's triangle is {1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1}. The terms 45 (= 9*5) and 252 (= 9*28) are the only multiples of nine, and the former occurs twice, while the latter is alone at the center, thus a(10) = 2+1 = 3. %t A249733 Total/@Table[If[Mod[Binomial[n,k],9]==0,1,0],{n,0,80},{k,0,n}] (* _Harvey P. Dale_, Feb 12 2020 *) %o A249733 (PARI) %o A249733 A249733(n) = { my(c=0); for(k=0,n\2,if(!(binomial(n,k)%9),c += (if(k<(n/2),2,1)))); return(c); } \\ Unoptimized. %o A249733 for(n=0, 6561, write("b249733.txt", n, " ", A249733(n))); %o A249733 (Python) %o A249733 import re %o A249733 from gmpy2 import digits %o A249733 def A249733(n): %o A249733 s = digits(n,3) %o A249733 n1 = s.count('1') %o A249733 n2 = s.count('2') %o A249733 n01 = s.count('10') %o A249733 n02 = s.count('20') %o A249733 n11 = len(re.findall('(?=11)',s)) %o A249733 n12 = s.count('21') %o A249733 return n+1-(((3*(n01+1)+(n02<<2)+n12<<2)+3*n11)*(3**n2<<n1)//12) # _Chai Wah Wu_, Jul 24 2025 %Y A249733 Cf. A007318, A048277, A048967, A062296, A095143, A249343, A249723, A249731, A249732, A051382, A249719, A249720, A006047. %K A249733 nonn %O A249733 0,10 %A A249733 _Antti Karttunen_, Nov 04 2014