A034932 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 16.
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 4, 15, 6, 1, 1, 7, 5, 3, 3, 5, 7, 1, 1, 8, 12, 8, 6, 8, 12, 8, 1, 1, 9, 4, 4, 14, 14, 4, 4, 9, 1, 1, 10, 13, 8, 2, 12, 2, 8, 13, 10, 1, 1, 11, 7, 5, 10, 14, 14, 10
Offset: 0
Examples
Triangle begins: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 4 15 6 1 1 7 5 3 3 5 7 1 1 8 12 8 6 8 12 8 1 1 9 4 4 14 14 4 4 9 1 1 10 13 8 2 12 2 8 13 10 1 1 11 7 5 10 14 14 10 5 7 11 1 . Written in hexadecimal (with a=10, b=11, ..., f=15), rows 0..32 are . 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 a a 5 1 1 6 f 4 f 6 1 1 7 5 3 3 5 7 1 1 8 c 8 6 8 c 8 1 1 9 4 4 e e 4 4 9 1 1 a d 8 2 c 2 8 d a 1 1 b 7 5 a e e a 5 7 b 1 1 c 2 c f 8 c 8 f c 2 c 1 1 d e e b 7 4 4 7 b e e d 1 1 e b c 9 2 b 8 b 2 9 c b e 1 1 f 9 7 5 b d 3 3 d b 5 7 9 f 1 1 0 8 0 c 0 8 0 6 0 8 0 c 0 8 0 1 1 1 8 8 c c 8 8 6 6 8 8 c c 8 8 1 1 1 2 9 0 4 8 4 0 e c e 0 4 8 4 0 9 2 1 1 3 b 9 4 c c 4 e a a e 4 c c 4 9 b 3 1 1 4 e 4 d 0 8 0 2 8 4 8 2 0 8 0 d 4 e 4 1 1 5 2 2 1 d 8 8 2 a c c a 2 8 8 d 1 2 2 5 1 1 6 7 4 3 e 5 0 a c 6 8 6 c a 0 5 e 3 4 7 6 1 1 7 d b 7 1 3 5 a 6 2 e e 2 6 a 5 3 1 7 b d 7 1 1 8 4 8 2 8 4 8 f 0 8 0 c 0 8 0 f 8 4 8 2 8 4 8 1 1 9 c c a a c c 7 f 8 8 c c 8 8 f 7 c c a a c c 9 1 1 a 5 8 6 4 6 8 3 6 7 0 4 8 4 0 7 6 3 8 6 4 6 8 5 a 1 1 b f d e a a e b 9 d 7 4 c c 4 7 d 9 b e a a e d f b 1 1 c a c b 8 4 8 9 4 6 4 b 0 8 0 b 4 6 4 9 8 4 8 b c a c 1 1 d 6 6 7 3 c c 1 d a a f b 8 8 b f a a d 1 c c 3 7 6 6 d 1 1 e 3 c d a f 8 d e 7 4 9 a 3 0 3 a 9 4 7 e d 8 f a d c 3 e 1 1 f 1 f 9 7 9 7 5 b 5 b d 3 d 3 3 d 3 d b 5 b 5 7 9 7 9 f 1 f 1 1 0 0 0 8 0 0 0 c 0 0 0 8 0 0 0 6 0 0 0 8 0 0 0 c 0 0 0 8 0 0 0 1
Links
- Reinhard Zumkeller, Rows n = 0..120 of triangle, flattened
- Ilya Gutkovskiy, Illustrations (triangle formed by reading Pascal's triangle mod m)
- James G. Huard, Blair K. Spearman, and Kenneth S. Williams, Pascal's triangle (mod 8), European Journal of Combinatorics 19:1 (1998), pp. 45-62.
- Index entries for triangles and arrays related to Pascal's triangle
Crossrefs
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), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), (this sequence) (m = 16).
Programs
-
Haskell
a034932 n k = a034932_tabl !! n !! k a034932_row n = a034932_tabl !! n a034932_tabl = iterate (\ws -> zipWith ((flip mod 16 .) . (+)) ([0] ++ ws) (ws ++ [0])) [1] -- Reinhard Zumkeller, Mar 14 2015
-
Mathematica
Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 16] (* Robert G. Wilson v, May 26 2004 *)
-
Python
from math import comb, isqrt def A034932(n): g = (m:=isqrt(f:=n+1<<1))-(f<=m*(m+1)) k = n-comb(g+1,2) if k.bit_count()+(g-k).bit_count()-g.bit_count()>3: return 0 def g1(s,w,e): c, d = 1, 0 if len(s) == 0: return c, d a, b = int(s,2), int(w,2) if a>=b: k = comb(a,b)&15 j = (~k & k-1).bit_length() d += j*e k >>= j c = c*pow(k,e,16)&15 else: if int(s[0:1],2)
Chai Wah Wu, Jul 20 2025
Formula
T(i, j) = binomial(i, j) mod 16.
Comments