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.

Showing 1-2 of 2 results.

A109435 Triangle read by rows: T(n,m) = number of binary numbers n digits long, which have m 0's as a substring.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 3, 1, 16, 15, 8, 3, 1, 32, 31, 19, 8, 3, 1, 64, 63, 43, 20, 8, 3, 1, 128, 127, 94, 47, 20, 8, 3, 1, 256, 255, 201, 107, 48, 20, 8, 3, 1, 512, 511, 423, 238, 111, 48, 20, 8, 3, 1, 1024, 1023, 880, 520, 251, 112, 48, 20, 8, 3, 1, 2048, 2047, 1815, 1121, 558
Offset: 0

Views

Author

Robert G. Wilson v, Jun 28 2005

Keywords

Comments

Column 0 is A000079, column 2 is A000225, column 3 is A008466, column 4 is A050231
Column 5 is A050232, column 6 is A050233, the last column is A001792.
A050227 with a leading column of powers of 2. - R. J. Mathar, Mar 25 2014

Examples

			Triangle begins:
n\m_0__1__2__3__4__5
0|  1  0  0  0  0  0
1|  2  1  0  0  0  0
2|  4  3  1  0  0  0
3|  8  7  3  1  0  0
4| 16 15  8  3  1  0
5| 32 31 19  8  3  1
T(5,3)=8 because there are 8 length 5 binary words that contain 000 as a contiguous substring:  00000, 00001, 00010, 00011, 01000, 10000, 10001, 11000. - _Geoffrey Critzer_, Jan 07 2014
		

Crossrefs

Cf. A109433, A001792, A109436, A102712 (row sums ?).

Programs

  • Maple
    A109435 := proc(n,k)
        option remember ;
        if n< k then
            0;
        elif n = k then
            1;
        else
            2*procname(n-1,k)+2^(n-1-k)-procname(n-1-k,k) ;
        end if;
    end proc:
    seq(seq( A109435(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jun 05 2025
  • Mathematica
    T[n_, m_] := Length[ Select[ StringPosition[ #, StringDrop[ ToString[10^m], 1]] & /@ Table[ ToString[ FromDigits[ IntegerDigits[i, 2]]], {i, 2^n, 2^(n + 1) - 1}], # != {} &]]; Flatten[ Table[ T[n, m], {n, 0, 11}, {m, 0, n}]]
    nn=15;Map[Select[#,#>0&]&,Transpose[Table[CoefficientList[Series[x^m/(1-Sum[x^k,{k,1,m}])/(1-2x),{x,0,nn}],x],{m,0,nn}]]]//Grid (* Geoffrey Critzer, Jan 07 2014 *)

Formula

G.f. for column m: x^m/( (1 - Sum_{k=1..m} x^k)*(1-2*x) ). - Geoffrey Critzer, Jan 07 2014

A109434 Irregular triangle read by rows: row n contains the numbers from 2^n up to (n+3)*2^(n-2), inclusive, read along their common subdiagonal of A109433.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 4, 5, 8, 11, 12, 16, 24, 27, 28, 32, 51, 60, 63, 64, 64, 107, 131, 140, 143, 144, 128, 222, 282, 307, 316, 319, 320, 256, 457, 601, 666, 691, 700, 703, 704, 512, 935, 1270, 1432, 1498, 1523, 1532, 1535, 1536, 1024, 1904, 2665, 3057, 3224, 3290
Offset: 0

Views

Author

Robert G. Wilson v, Jun 28 2005

Keywords

Comments

Evolution of 2^n into 2^(n-2)(n+3) as exhibited by A109433.
The forward differences of the last row of the table approache A058396.

Examples

			Triangle begins
   0  0
   1  1
   2  2
   4  5
   8 11 12
  16 24 27 28
  32 51 60 63 64
		

Crossrefs

Programs

  • Mathematica
    T[n_, m_] := Length[ Select[ StringPosition[ #, ToString[(10^m - 1)/9]] & /@ Table[ ToString[ FromDigits[ IntegerDigits[i, 2]]], {i, 2^n, 2^(n + 1) - 1}], # != {} &]]; Join[{0, 0, 1, 1, 2}, Flatten[ Table[ T[n + i, i], {n, 0, 9}, {i, n + 1}]]]

Extensions

New definition from R. J. Mathar, Nov 27 2007
Showing 1-2 of 2 results.