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.

A356996 a(n) = b(n) - b(b(n)) - b(n - b(n)) for n >= 3, where b(n) = A356989(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
Offset: 3

Views

Author

Peter Bala, Sep 10 2022

Keywords

Comments

The sequence appears to consist of blocks of terms of the form 1, 2, 3, ..., A(k) - 1, A(k), A(k) - 1, ..., 3, 2, 1, where A(k) = A000930(k), separated by blocks of consecutive zeros.
The sequence of local peak values of the line graph of the sequence {a(n)} begins 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, ..., conjecturally A000930; the local peaks occur at abscissa values n = 8, 12, 17, 25, 37, 54, 79, 116, 170, 249, ..., conjecturally {A179070(k): k >= 7}. Cf. A356995 and A356997.

Examples

			Sequence arranged as an irregular triangle; after the first row of zeros the row lengths are conjecturally equal to A164316(k) for k >= 2.
0, 0, 0, 0, 0;
1, 0, 0, 0;
1, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0, 0;
1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0;
1, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 2, 3, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
...
		

Crossrefs

Programs

  • Maple
    # b(n) = A356989
    b := proc(n) option remember; if n = 1 then 1 else n - b(b(b(n - b(b(b(b(n-1))))))) end if; end proc:
    seq(b(n) - b(b(n)) - b(n - b(n)), n = 3..300);

Formula

a(n+1) - a(n) belongs to {1, 0, -1}.

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.

Original entry on oeis.org

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, 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, 1, 2, 4, 8, 13, 16, 16, 4, 55, 2, 1, 0, 1, 2, 4, 8, 8, 24
Offset: 0

Views

Author

Peter Kagey, Sep 17 2023

Keywords

Examples

			Table begins:
 n\k | 0  1  2  3   4   5   6   7    8    9   10   11
-----+----------------------------------------------------
   0 | 1, 0, 0, 0,  0,  0,  0,  0,   0,   0,   0,   0, ...
   1 | 1, 1, 1, 1,  1,  1,  1,  1,   1,   1,   1,   1, ...
   2 | 1, 2, 2, 2,  2,  2,  2,  2,   2,   2,   2,   2, ...
   3 | 1, 2, 3, 5,  8, 13, 21, 34,  55,  89, 144, 233, ...
   4 | 1, 2, 4, 4,  4,  4,  4,  4,   4,   4,   4,   4, ...
   5 | 1, 2, 4, 5,  7, 11, 16, 23,  34,  50,  73, 107, ...
   6 | 1, 2, 4, 6, 10, 16, 26, 42,  68, 110, 178, 288, ...
   7 | 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, ...
   8 | 1, 2, 4, 8,  8,  8,  8,  8,   8,   8,   8,   8, ...
   9 | 1, 2, 4, 8,  9, 11, 15, 23,  32,  43,  58,  81, ...
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.
		

Crossrefs

Cf. A000045 (row 3), A164316 (row 5), A128588 (row 6), A000073 (row 7).

Programs

  • Mathematica
    A365746Row[s_,
      numberOfTerms_] := (digits = If[s == 0, 1, Ceiling[Log[2, s + 1]]];
      m = 2^(digits - 1);
      transferMatrix =
       If[s == 0, {{0}},
        Table[If[(Ceiling[i/2] ==
             j) || ((i <= s - m) && (Ceiling[i/2] == j - m/2)), 1, 0], {i,
           1, m}, {j, 1, m}]];
      sequence =
       Table[2^k, {k, 0, digits - 1}] ~Join~
        Table[MatrixPower[transferMatrix, k] // Total // Total, {k, 1,
          numberOfTerms - digits}];
      Take[sequence, numberOfTerms])

Formula

G.f. for row n = 0: 1;
G.f. for row n = 1: 1/(1 - x);
G.f. for row n = 2: (1 + x)/(1 - x);
G.f. for row n = 3: (1 + x)/(1 - x - x^2);
G.f. for row n = 4: (1 + x + 2x^2)/(1 - x);
G.f. for row n = 5: (1 + x + 2x^2)/(1 - x - x^3);
G.f. for row n = 6: (1 + x + x^2)/(1 - x - x^2);
G.f. for row n = 7: (1 + x + x^2)/(1 - x - x^2 - x^3);
G.f. for row n = 8: (1 + x + 2 x^2 + 4 x^3)/(1 - x);
G.f. for row n = 9: (1 + x + 2x^2 + 4x^3)/(1 - x - x^4).
Showing 1-2 of 2 results.