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.

A382725 Number of entries in the n-th row of Pascal's triangle not divisible by 8.

This page as a plain text file.
%I A382725 #15 Aug 17 2025 07:59:37
%S A382725 1,2,3,4,5,6,7,8,5,10,9,12,11,14,14,16,5,10,13,20,13,18,20,24,11,22,
%T A382725 20,28,22,28,28,32,5,10,13,20,17,26,28,40,13,26,26,36,28,40,40,48,11,
%U A382725 22,28,44,28,40,44,56,22,44,40,56,44,56,56,64,5,10,13,20,17,26,28,40,17,34,34,52,36,56,56,80,13
%N A382725 Number of entries in the n-th row of Pascal's triangle not divisible by 8.
%H A382725 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 A382725 (Python)
%o A382725 def A382725(n):
%o A382725     n1 = n>>1
%o A382725     n2 = n1>>1
%o A382725     np = ~n
%o A382725     n100 = (n2&(~n1)&np).bit_count()
%o A382725     n110 = (n2&n1&np).bit_count()
%o A382725     n10 = (n1&np).bit_count()
%o A382725     return ((n100+1<<3)+(n110<<1)+n10*(n10+3))<<n.bit_count()>>3 # _Chai Wah Wu_, Aug 10 2025
%Y A382725 Cf. A001316, A006047, A194459, A382720-A382724.
%K A382725 nonn,changed
%O A382725 0,2
%A A382725 _N. J. A. Sloane_, Apr 23 2025