A282714 Base-2 generalized Pascal triangle P_2 read by rows (see Comments for precise definition).
1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 2, 1, 0, 0, 1, 1, 3, 0, 3, 0, 0, 0, 1, 1, 1, 3, 0, 3, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 0, 0, 0, 1, 1, 2, 3, 1, 1, 1, 1, 0, 0, 0, 1, 1, 3, 1, 3, 0, 2, 0, 1, 0, 0, 0, 1, 1, 2, 4, 1, 2, 0, 2, 0, 0
Offset: 0
Examples
Triangle begins: 1, 1,1, 1,1,1, 1,2,0,1, 1,1,2,0,1, 1,2,1,1,0,1, 1,2,2,1,0,0,1, 1,3,0,3,0,0,0,1, 1,1,3,0,3,0,0,0,1 1,2,2,1,1,2,0,0,0,1 1,2,3,1,1,1,1,0,0,0,1 1,3,1,3,0,2,0,1,0,0,0,1 1,2,4,1,2,0,2,0,0,0,0,0,1 ... The binary numbers are epsilon, 1, 10, 11, 100, 101, 110, 111, 1000, ... The fifth number 101 contains eps 1 10 11 100 101 respectively .1..2..1..1...0...1 times, which is row 5 of the triangle.
Links
- Lars Blomberg, Table of n, a(n) for n = 0..10000
- Julien Leroy, Michel Rigo, Manon Stipulanti, Counting the number of non-zero coefficients in rows of generalized Pascal triangles, Discrete Mathematics 340 (2017), 862-881.
- Julien Leroy, Michel Rigo, Manon Stipulanti, Counting Subwords Occurrences in Base-b Expansions, arXiv:1705.10065 [math.CO], 2017.
- Julien Leroy, Michel Rigo, Manon Stipulanti, Counting Subwords Occurrences in Base-b Expansions, Integers, Electronic Journal of Combinatorial Number Theory 18A (2018), #A13.
- Manon Stipulanti, Convergence of Pascal-Like Triangles in Parry-Bertrand Numeration Systems, arXiv:1801.03287 [math.CO], 2018.
Crossrefs
A007306 gives (essentially) the number of nonzero entries in the rows.
Programs
-
Maple
Nscatsub := proc(subw,w) local lsubw,lw,N,wri,wr,i ; lsubw := nops(subw) ; lw := nops(w) ; N := 0 ; if lsubw = 0 then return 1 ; elif lsubw > lw then return 0 ; else for wri in combinat[choose](lw,lsubw) do wr := [] ; for i in wri do wr := [op(wr),op(i,w)] ; end do: if verify(subw,wr,'sublist') then N := N+1 ; end if; end do: end if; return N ; end proc: P := proc(n,k,b) local n3,k3 ; n3 := convert(n,base,b) ; k3 := convert(k,base,b) ; Nscatsub(k3,n3) ; end proc: A282714 := proc(n,k) P(n,k,2) ; end proc: # R. J. Mathar, Mar 03 2017
-
Mathematica
nmax = 12; row[n_] := Module[{bb, ss}, bb = Table[IntegerDigits[k, 2], {k, 0, n}]; ss = Subsets[Last[bb]]; Prepend[Count[ss, #]& /@ bb // Rest, 1]]; Table[row[n], {n, 0, nmax}] // Flatten (* Jean-François Alcover, Dec 14 2017 *)
Extensions
More terms from Lars Blomberg, Mar 03 2017
Comments