|
|
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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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:
P(n, k, 2) ;
|
|
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]];
|
|
CROSSREFS
|
A007306 gives (essentially) the number of nonzero entries in the rows.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|