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.

A365746 Table read by antidiagonals upward: T(n,k) is the number of binary strings of length k with the property that every substring of length A070939(n) is lexicographically earlier than the binary expansion of n; n, k >= 0.

This page as a plain text file.
%I A365746 #14 Sep 25 2023 08:22:42
%S A365746 1,1,0,1,1,0,1,2,1,0,1,2,2,1,0,1,2,3,2,1,0,1,2,4,5,2,1,0,1,2,4,4,8,2,
%T A365746 1,0,1,2,4,5,4,13,2,1,0,1,2,4,6,7,4,21,2,1,0,1,2,4,7,10,11,4,34,2,1,0,
%U A365746 1,2,4,8,13,16,16,4,55,2,1,0,1,2,4,8,8,24
%N A365746 Table read by antidiagonals upward: T(n,k) is the number of binary strings of length k with the property that every substring of length A070939(n) is lexicographically earlier than the binary expansion of n; n, k >= 0.
%F A365746 G.f. for row n = 0: 1;
%F A365746 G.f. for row n = 1: 1/(1 - x);
%F A365746 G.f. for row n = 2: (1 + x)/(1 - x);
%F A365746 G.f. for row n = 3: (1 + x)/(1 - x - x^2);
%F A365746 G.f. for row n = 4: (1 + x + 2x^2)/(1 - x);
%F A365746 G.f. for row n = 5: (1 + x + 2x^2)/(1 - x - x^3);
%F A365746 G.f. for row n = 6: (1 + x + x^2)/(1 - x - x^2);
%F A365746 G.f. for row n = 7: (1 + x + x^2)/(1 - x - x^2 - x^3);
%F A365746 G.f. for row n = 8: (1 + x + 2 x^2 + 4 x^3)/(1 - x);
%F A365746 G.f. for row n = 9: (1 + x + 2x^2 + 4x^3)/(1 - x - x^4).
%e A365746 Table begins:
%e A365746  n\k | 0  1  2  3   4   5   6   7    8    9   10   11
%e A365746 -----+----------------------------------------------------
%e A365746    0 | 1, 0, 0, 0,  0,  0,  0,  0,   0,   0,   0,   0, ...
%e A365746    1 | 1, 1, 1, 1,  1,  1,  1,  1,   1,   1,   1,   1, ...
%e A365746    2 | 1, 2, 2, 2,  2,  2,  2,  2,   2,   2,   2,   2, ...
%e A365746    3 | 1, 2, 3, 5,  8, 13, 21, 34,  55,  89, 144, 233, ...
%e A365746    4 | 1, 2, 4, 4,  4,  4,  4,  4,   4,   4,   4,   4, ...
%e A365746    5 | 1, 2, 4, 5,  7, 11, 16, 23,  34,  50,  73, 107, ...
%e A365746    6 | 1, 2, 4, 6, 10, 16, 26, 42,  68, 110, 178, 288, ...
%e A365746    7 | 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, ...
%e A365746    8 | 1, 2, 4, 8,  8,  8,  8,  8,   8,   8,   8,   8, ...
%e A365746    9 | 1, 2, 4, 8,  9, 11, 15, 23,  32,  43,  58,  81, ...
%e A365746 For (n,k) = (3,4), we see that T(3,4) = 8 because there are 8 binary strings of length k = 4 where all length A070939(3) = 2 substrings are lexicographically earlier than "11" (the binary expansion of n = 3): 0000, 0001, 0010, 0100, 0101, 1000, 1001, and 1010.
%t A365746 A365746Row[s_,
%t A365746   numberOfTerms_] := (digits = If[s == 0, 1, Ceiling[Log[2, s + 1]]];
%t A365746   m = 2^(digits - 1);
%t A365746   transferMatrix =
%t A365746    If[s == 0, {{0}},
%t A365746     Table[If[(Ceiling[i/2] ==
%t A365746          j) || ((i <= s - m) && (Ceiling[i/2] == j - m/2)), 1, 0], {i,
%t A365746        1, m}, {j, 1, m}]];
%t A365746   sequence =
%t A365746    Table[2^k, {k, 0, digits - 1}] ~Join~
%t A365746     Table[MatrixPower[transferMatrix, k] // Total // Total, {k, 1,
%t A365746       numberOfTerms - digits}];
%t A365746   Take[sequence, numberOfTerms])
%Y A365746 Cf. A030190, A070939, A209972.
%Y A365746 Cf. A000045 (row 3), A164316 (row 5), A128588 (row 6), A000073 (row 7).
%K A365746 nonn,tabl,base
%O A365746 0,8
%A A365746 _Peter Kagey_, Sep 17 2023