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.

A282714 Base-2 generalized Pascal triangle P_2 read by rows (see Comments for precise definition).

This page as a plain text file.
%I A282714 #46 Aug 26 2018 19:30:32
%S A282714 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,
%T A282714 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,
%U A282714 1,3,0,2,0,1,0,0,0,1,1,2,4,1,2,0,2,0,0
%N A282714 Base-2 generalized Pascal triangle P_2 read by rows (see Comments for precise definition).
%C A282714 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.
%C A282714 Row n has sum n+1.
%H A282714 Lars Blomberg, <a href="/A282714/b282714.txt">Table of n, a(n) for n = 0..10000</a>
%H A282714 Julien Leroy, Michel Rigo, Manon Stipulanti, <a href="http://dx.doi.org/10.1016/j.disc.2017.01.003">Counting the number of non-zero coefficients in rows of generalized Pascal triangles</a>, Discrete Mathematics 340 (2017), 862-881.
%H A282714 Julien Leroy, Michel Rigo, Manon Stipulanti, <a href="https://arxiv.org/abs/1705.10065">Counting Subwords Occurrences in Base-b Expansions</a>, arXiv:1705.10065 [math.CO], 2017.
%H A282714 Julien Leroy, Michel Rigo, Manon Stipulanti, <a href="http://math.colgate.edu/~integers/sjs13/sjs13.Abstract.html">Counting Subwords Occurrences in Base-b Expansions</a>, Integers, Electronic Journal of Combinatorial Number Theory 18A (2018), #A13.
%H A282714 Manon Stipulanti, <a href="https://arxiv.org/abs/1801.03287">Convergence of Pascal-Like Triangles in Parry-Bertrand Numeration Systems</a>, arXiv:1801.03287 [math.CO], 2018.
%e A282714 Triangle begins:
%e A282714   1,
%e A282714   1,1,
%e A282714   1,1,1,
%e A282714   1,2,0,1,
%e A282714   1,1,2,0,1,
%e A282714   1,2,1,1,0,1,
%e A282714   1,2,2,1,0,0,1,
%e A282714   1,3,0,3,0,0,0,1,
%e A282714   1,1,3,0,3,0,0,0,1
%e A282714   1,2,2,1,1,2,0,0,0,1
%e A282714   1,2,3,1,1,1,1,0,0,0,1
%e A282714   1,3,1,3,0,2,0,1,0,0,0,1
%e A282714   1,2,4,1,2,0,2,0,0,0,0,0,1
%e A282714   ...
%e A282714 The binary numbers are epsilon, 1, 10, 11, 100, 101, 110, 111, 1000, ...
%e A282714 The fifth number 101 contains
%e A282714 eps 1 10 11 100 101 respectively
%e A282714 .1..2..1..1...0...1 times, which is row 5 of the triangle.
%p A282714 Nscatsub := proc(subw,w)
%p A282714     local lsubw,lw,N,wri,wr,i ;
%p A282714     lsubw := nops(subw) ;
%p A282714     lw := nops(w) ;
%p A282714     N := 0 ;
%p A282714     if lsubw = 0 then
%p A282714         return 1 ;
%p A282714     elif lsubw > lw then
%p A282714         return 0 ;
%p A282714     else
%p A282714         for wri in combinat[choose](lw,lsubw) do
%p A282714             wr := [] ;
%p A282714             for i in wri do
%p A282714                 wr := [op(wr),op(i,w)] ;
%p A282714             end do:
%p A282714             if verify(subw,wr,'sublist') then
%p A282714                 N := N+1 ;
%p A282714             end if;
%p A282714         end do:
%p A282714     end if;
%p A282714     return N ;
%p A282714 end proc:
%p A282714 P := proc(n,k,b)
%p A282714     local n3,k3 ;
%p A282714     n3 := convert(n,base,b) ;
%p A282714     k3 := convert(k,base,b) ;
%p A282714     Nscatsub(k3,n3) ;
%p A282714 end proc:
%p A282714 A282714 := proc(n,k)
%p A282714     P(n,k,2) ;
%p A282714 end proc: # _R. J. Mathar_, Mar 03 2017
%t A282714 nmax = 12;
%t A282714 row[n_] := Module[{bb, ss}, bb = Table[IntegerDigits[k, 2], {k, 0, n}]; ss = Subsets[Last[bb]]; Prepend[Count[ss, #]& /@ bb // Rest, 1]];
%t A282714 Table[row[n], {n, 0, nmax}] // Flatten (* _Jean-François Alcover_, Dec 14 2017 *)
%Y A282714 A007306 gives (essentially) the number of nonzero entries in the rows.
%K A282714 nonn,tabl
%O A282714 0,8
%A A282714 _N. J. A. Sloane_, Mar 02 2017
%E A282714 More terms from _Lars Blomberg_, Mar 03 2017