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.

A095141 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 6.

This page as a plain text file.
%I A095141 #33 Aug 04 2025 03:39:15
%S A095141 1,1,1,1,2,1,1,3,3,1,1,4,0,4,1,1,5,4,4,5,1,1,0,3,2,3,0,1,1,1,3,5,5,3,
%T A095141 1,1,1,2,4,2,4,2,4,2,1,1,3,0,0,0,0,0,0,3,1,1,4,3,0,0,0,0,0,3,4,1,1,5,
%U A095141 1,3,0,0,0,0,3,1,5,1,1,0,0,4,3,0,0,0,3,4,0,0,1,1,1,0,4,1,3,0,0,3,1,4,0,1,1
%N A095141 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 6.
%H A095141 Bill Gosper, <a href="/A095141/a095141.png">Pastel-colored illustration of triangle</a>
%H A095141 Ilya Gutkovskiy, <a href="/A275198/a275198.pdf">Illustrations (triangle formed by reading Pascal's triangle mod m)</a>
%H A095141 Ivan Korec, <a href="http://actamath.savbb.sk/acta0405.shtml">Definability of Pascal's Triangles Modulo 4 and 6 and Some Other Binary Operations from Their Associated Equivalence Relations</a>, Acta Univ. M. Belii Ser. Math. 4 (1996), pp. 53-66.
%H A095141 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F A095141 T(i, j) = binomial(i, j) mod 6.
%t A095141 Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 6]
%t A095141 Graphics[Table[{%[Mod[Binomial[n, k], 6]/5], RegularPolygon[{4√3 (k - n/2), -6 n}, {4,π/6}, 6]}, {n, 0, 105}, {k, 0, n}]] (* Mma code for illustration, _Bill Gosper_, Aug 05 2017 *)
%o A095141 (Python)
%o A095141 from math import isqrt, comb
%o A095141 from sympy.ntheory.modular import crt
%o A095141 def A095141(n):
%o A095141     w, c = n-((r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))*(r+1)>>1), 1
%o A095141     d = int(not ~r & w)
%o A095141     while True:
%o A095141         r, a = divmod(r,3)
%o A095141         w, b = divmod(w,3)
%o A095141         c = c*comb(a,b)%3
%o A095141         if r<3 and w<3:
%o A095141             c = c*comb(r,w)%3
%o A095141             break
%o A095141     return crt([3,2],[c,d])[0] # _Chai Wah Wu_, May 01 2025
%Y A095141 Cf. A007318, A047999, A083093, A034931, A095140, A095142, A034930, A095143, A008975, A095144, A095145, A034932.
%Y A095141 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), (this sequence) (m = 6), A095142 (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).
%K A095141 easy,nonn,tabl
%O A095141 0,5
%A A095141 _Robert G. Wilson v_, May 29 2004