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.

A213126 Rows of triangle formed using Pascal's rule, except sums in the n-th row are modulo n: T(n,0) = T(n,n) = 1 and T(n,k) = (T(n-1,k-1) + T(n-1,k)) mod n.

This page as a plain text file.
%I A213126 #26 Oct 01 2023 16:34:02
%S A213126 1,1,1,1,0,1,1,1,1,1,1,2,2,2,1,1,3,4,4,3,1,1,4,1,2,1,4,1,1,5,5,3,3,5,
%T A213126 5,1,1,6,2,0,6,0,2,6,1,1,7,8,2,6,6,2,8,7,1,1,8,5,0,8,2,8,0,5,8,1,1,9,
%U A213126 2,5,8,10,10,8,5,2,9,1,1,10,11,7,1,6,8,6
%N A213126 Rows of triangle formed using Pascal's rule, except sums in the n-th row are modulo n: T(n,0) = T(n,n) = 1 and T(n,k) = (T(n-1,k-1) + T(n-1,k)) mod n.
%e A213126 Triangle begins:
%e A213126   1;
%e A213126   1,  1;
%e A213126   1,  0,  1;
%e A213126   1,  1,  1,  1;
%e A213126   1,  2,  2,  2,  1;
%e A213126   1,  3,  4,  4,  3,  1;
%e A213126   1,  4,  1,  2,  1,  4,  1;
%e A213126   1,  5,  5,  3,  3,  5,  5,  1;
%e A213126   1,  6,  2,  0,  6,  0,  2,  6,  1;
%e A213126   1,  7,  8,  2,  6,  6,  2,  8,  7,  1;
%e A213126   1,  8,  5,  0,  8,  2,  8,  0,  5,  8,  1;
%e A213126   1,  9,  2,  5,  8, 10, 10,  8,  5,  2,  9,  1;
%t A213126 T[n_,k_]:=If[k==0 || k==n, 1, Mod[T[n - 1, k - 1] + T[n- 1, k], n]]; Table[T[n, k], {n, 0, 15}, {k, 0, n}] // Flatten (* _Indranil Ghosh_, Apr 29 2017 *)
%o A213126 (Python)
%o A213126 src = [0]*1024
%o A213126 dst = [0]*1024
%o A213126 for n in range(19):
%o A213126     dst[0] = dst[n] = 1
%o A213126     for k in range(1, n):
%o A213126         dst[k] = (src[k-1]+src[k]) % n
%o A213126     for k in range(n+1):
%o A213126         src[k] = dst[k]
%o A213126         print(dst[k], end=',')
%Y A213126 Cf. A007318 - Pascal's triangle read by rows.
%Y A213126 Cf. A047999, A083093, A034931, A034930, A034932, A008975.
%K A213126 nonn,tabl
%O A213126 0,12
%A A213126 _Alex Ratushnyak_, Jun 06 2012
%E A213126 Offset corrected by _Joerg Arndt_, Dec 05 2016