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 A008975 #41 May 01 2025 15:40:47 %S A008975 1,1,1,1,2,1,1,3,3,1,1,4,6,4,1,1,5,0,0,5,1,1,6,5,0,5,6,1,1,7,1,5,5,1, %T A008975 7,1,1,8,8,6,0,6,8,8,1,1,9,6,4,6,6,4,6,9,1,1,0,5,0,0,2,0,0,5,0,1,1,1, %U A008975 5,5,0,2,2,0,5,5,1,1,1,2,6,0,5,2,4,2,5,0,6,2,1,1,3,8,6,5,7,6,6 %N A008975 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 10. %H A008975 Reinhard Zumkeller, <a href="/A008975/b008975.txt">Rows n=0..150 of triangle, flattened</a> %H A008975 Ilya Gutkovskiy, <a href="/A275198/a275198.pdf">Illustrations (triangle formed by reading Pascal's triangle mod m)</a> %H A008975 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a> %F A008975 T(i, j) = binomial(i, j) mod 10. %t A008975 Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 10] (* _Robert G. Wilson v_, May 26 2004 *) %o A008975 (Haskell) %o A008975 a008975 n k = a008975_tabl !! n !! k %o A008975 a008975_row n = a008975_tabl !! n %o A008975 a008975_tabl = iterate %o A008975 (\row -> map (`mod` 10) $ zipWith (+) ([0] ++ row) (row ++ [0])) [1] %o A008975 -- _Reinhard Zumkeller_, Feb 24 2012 %o A008975 (Python) %o A008975 from math import isqrt, comb %o A008975 from sympy.ntheory.modular import crt %o A008975 def A008975(n): %o A008975 w, c = n-((r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))*(r+1)>>1), 1 %o A008975 d = int(not ~r & w) %o A008975 while True: %o A008975 r, a = divmod(r,5) %o A008975 w, b = divmod(w,5) %o A008975 c = c*comb(a,b)%5 %o A008975 if r<5 and w<5: %o A008975 c = c*comb(r,w)%5 %o A008975 break %o A008975 return crt([5,2],[c,d])[0] # _Chai Wah Wu_, May 01 2025 %Y A008975 Cf. A007318, A047999, A083093, A034931, A034930, A034932. %Y A008975 Cf. A208278 (row sums), A208279 (central terms), A208134 (number of zeros per row), A208280 (distinct terms per row). %Y A008975 Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930 (m = 8), A095143 (m = 9), (this sequence) (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16). %K A008975 nonn,tabl,base %O A008975 0,5 %A A008975 _N. J. A. Sloane_