cp's OEIS Frontend

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.

A382731 Total number of entries in rows 0,1,...,n of Pascal's triangle not divisible by 8.

This page as a plain text file.
%I A382731 #12 Aug 17 2025 07:59:41
%S A382731 1,3,6,10,15,21,28,36,41,51,60,72,83,97,111,127,132,142,155,175,188,
%T A382731 206,226,250,261,283,303,331,353,381,409,441,446,456,469,489,506,532,
%U A382731 560,600,613,639,665,701,729,769,809,857,868,890,918,962,990,1030,1074,1130,1152,1196,1236,1292,1336,1392,1448,1512,1517,1527
%N A382731 Total number of entries in rows 0,1,...,n of Pascal's triangle not divisible by 8.
%H A382731 James G. Huard, Blair K. Spearman, and Kenneth S. Williams, <a href="https://doi.org/10.1006/eujc.1997.0146">Pascal's triangle (mod 8)</a>, European Journal of Combinatorics 19:1 (1998), pp. 45-62.
%o A382731 (Python)
%o A382731 def A382731(n):
%o A382731     c = 0
%o A382731     for m in range(n+1):
%o A382731         n1 = m>>1
%o A382731         n2 = n1>>1
%o A382731         np = ~m
%o A382731         n100 = (n2&(~n1)&np).bit_count()
%o A382731         n110 = (n2&n1&np).bit_count()
%o A382731         n10 = (n1&np).bit_count()
%o A382731         c += ((n100+1<<3)+(n110<<1)+n10*(n10+3))<<m.bit_count()>>3
%o A382731     return c # _Chai Wah Wu_, Aug 10 2025
%Y A382731 Cf. A001316, A006046-A006048, A194458, A194459, A382720-A382730.
%K A382731 nonn,changed
%O A382731 0,2
%A A382731 _N. J. A. Sloane_, Apr 23 2025