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.

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

This page as a plain text file.
%I A095140 #30 Apr 30 2025 14:08:28
%S A095140 1,1,1,1,2,1,1,3,3,1,1,4,1,4,1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,2,1,0,0,1,
%T A095140 2,1,1,3,3,1,0,1,3,3,1,1,4,1,4,1,1,4,1,4,1,1,0,0,0,0,2,0,0,0,0,1,1,1,
%U A095140 0,0,0,2,2,0,0,0,1,1,1,2,1,0,0,2,4,2,0,0,1,2,1,1,3,3,1,0,2,1,1,2,0,1,3,3,1
%N A095140 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 5.
%C A095140 {T(n,k)} is a fractal gasket with fractal (Hausdorff) dimension log(A000217(5))/log(5) = log(15)/log(5) = 1.68260... (see Reiter reference). Replacing values greater than 1 with 1 produces a binary gasket with the same dimension (see Bondarenko reference). - _Richard L. Ollerton_, Dec 14 2021
%D A095140 Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
%H A095140 Ilya Gutkovskiy, <a href="/A275198/a275198.pdf">Illustrations (triangle formed by reading Pascal's triangle mod m)</a>
%H A095140 Boris A. Bondarenko, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/pascal.html">Generalized Pascal Triangles and Pyramids</a>, English translation published by Fibonacci Association, Santa Clara Univ., Santa Clara, CA, 1993; see pp. 130-132.
%H A095140 A. M. Reiter, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Issues/31-2.pdf">Determining the dimension of fractals generated by Pascal's triangle</a>, Fibonacci Quarterly, 31(2), 1993, pp. 112-120.
%H A095140 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F A095140 T(i, j) = binomial(i, j) mod 5.
%t A095140 Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 5]
%o A095140 (Python)
%o A095140 from math import isqrt, comb
%o A095140 def A095140(n):
%o A095140     def f(m,k):
%o A095140         if m<5 and k<5: return comb(m,k)%5
%o A095140         c,a = divmod(m,5)
%o A095140         d,b = divmod(k,5)
%o A095140         return f(c,d)*f(a,b)%5
%o A095140     return f(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # _Chai Wah Wu_, Apr 30 2025
%Y A095140 Cf. A007318, A047999, A083093, A034931, A095141, A095142, A034930, A095143, A008975, A095144, A095145, A034932.
%Y A095140 Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), (this sequence) (m = 5), A095141 (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 A095140 easy,nonn,tabl
%O A095140 0,5
%A A095140 _Robert G. Wilson v_, May 29 2004