login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A282714
Base-2 generalized Pascal triangle P_2 read by rows (see Comments for precise definition).
4
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,8
COMMENTS
List the binary numbers in their natural order as binary strings, beginning with the empty string epsilon, which represents 0. Row n of the triangle gives the number of times the k-th string occurs as a (scattered) substring of the n-th string.
Row n has sum n+1.
LINKS
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.
EXAMPLE
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.
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 *)
CROSSREFS
A007306 gives (essentially) the number of nonzero entries in the rows.
Sequence in context: A053692 A341024 A286934 * A280634 A281491 A099494
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Mar 02 2017
EXTENSIONS
More terms from Lars Blomberg, Mar 03 2017
STATUS
approved