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 A249732 #25 Jul 25 2025 02:03:05 %S A249732 0,0,0,0,2,0,1,0,6,4,3,0,7,2,3,0,14,12,11,8,13,6,7,0,19,14,11,4,17,6, %T A249732 7,0,30,28,27,24,29,22,23,16,33,26,23,12,29,14,15,0,43,38,35,28,37,22, %U A249732 23,8,45,34,27,12,37,14,15,0,62,60,59,56,61,54,55,48,65,58,55,44,61,46,47,32 %N A249732 Number of (not necessarily distinct) multiples of 4 on row n of Pascal's triangle. %C A249732 a(n) = Number of zeros on row n of A034931 (Pascal's triangle reduced modulo 4). %C A249732 This should have a formula (see A048967). %H A249732 Antti Karttunen, <a href="/A249732/b249732.txt">Table of n, a(n) for n = 0..8192</a> %H A249732 Kenneth S. Davis and William A. Webb, <a href="https://www.fq.math.ca/Scanned/29-1/davis.pdf">Pascal's triangle modulo 4</a>, Fib. Quart., 29 (1991), 79-83. %F A249732 Other identities: %F A249732 a(n) <= A048277(n) for all n. %F A249732 a(n) <= A048967(n) for all n. %e A249732 Row 9 of Pascal's triangle is: {1,9,36,84,126,126,84,36,9,1}. The terms 36 and 84 are only multiples of four, and both of them occur two times on that row, thus a(9) = 2*2 = 4. %e A249732 Row 10 of Pascal's triangle is: {1,10,45,120,210,252,210,120,45,10,1}. The terms 120 (= 4*30) and 252 (= 4*63) are only multiples of four, and the former occurs twice, while the latter is alone at the center, thus a(10) = 2+1 = 3. %o A249732 (PARI) %o A249732 A249732(n) = { my(c=0); for(k=0,n\2,if(!(binomial(n,k)%4),c += (if(k<(n/2),2,1)))); return(c); } \\ Slow... %o A249732 for(n=0, 8192, write("b249732.txt", n, " ", A249732(n))); %o A249732 (Python) %o A249732 def A249732(n): return n+1-(2+((n>>1)&~n).bit_count()<<n.bit_count()>>1) # _Chai Wah Wu_, Jul 24 2025 %Y A249732 Cf. A007318, A034931, A048277, A048645, A072823, A048967, A062296, A187059, A249733. %K A249732 nonn %O A249732 0,5 %A A249732 _Antti Karttunen_, Nov 04 2014