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-6 of 6 results.

A291905 Row sums of A291904.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 1, 3, 2, 3, 4, 4, 6, 8, 8, 11, 14, 16, 21, 26, 32, 39, 49, 60, 75, 93, 114, 142, 176, 217, 268, 334, 411, 510, 632, 779, 967, 1196, 1477, 1832, 2266, 2801, 3470, 4291, 5310, 6572, 8129, 10061, 12449, 15401, 19058, 23581, 29178, 36102, 44668
Offset: 0

Views

Author

Seiichi Manyama, Sep 05 2017

Keywords

Comments

Number of compositions of n where the first part is 1 and the absolute difference between consecutive parts is 1.

Examples

			The a(6)=2 compositions of 6 are:
:
:  o o|
: oooo|
:
:   o|
:  oo|
: ooo|
:
The a(9)=3 compositions of 9 are:
:
:   o  |
:  ooo |
: ooooo|
:
:  o o o|
: oooooo|
:
:     o|
:  o oo|
: ooooo|
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(
         `if`(j=i, 0, b(n-j, j)), j=max(1, i-1)..min(i+1, n)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 05 2017
  • Mathematica
    T[0, 0] = 1; T[, 0] = 0; T[n?Positive, k_] /; 0 < k <= Floor[(Sqrt[8n+1] - 1)/2] := T[n, k] = T[n-k, k-1] + T[n-k, k+1]; T[, ] = 0;
    a[n_] := Sum[T[n, k], {k, 0, Floor[(Sqrt[8n+1] - 1)/2]}];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 29 2019 *)
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def b(n, i): return 1 if n==0 else sum(b(n - j, j) for j in range(max(1, i - 1), min(i + 1, n) + 1) if j != i)
    def a(n): return b(n, 0)
    print([a(n) for n in range(61)]) # Indranil Ghosh, Sep 06 2017, after Maple program

A291895 Triangle read by rows: T(n,k) = T(n-k,k-1) + T(n-k,k) + T(n-k,k+1) with T(0,0) = 1.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 2, 0, 5, 3, 1, 0, 8, 5, 1, 0, 13, 9, 2, 0, 22, 14, 4, 0, 36, 24, 6, 1, 0, 60, 40, 11, 1, 0, 100, 66, 18, 2, 0, 166, 111, 31, 4, 0, 277, 184, 52, 7, 0, 461, 308, 86, 12, 1, 0, 769, 513, 146, 20, 1, 0, 1282, 855, 243, 35, 2
Offset: 0

Views

Author

Seiichi Manyama, Sep 05 2017

Keywords

Examples

			First few rows are:
  1;
  0,  1;
  0,  1;
  0,  1,  1;
  0,  2,  1;
  0,  3,  2;
  0,  5,  3, 1;
  0,  8,  5, 1;
  0, 13,  9, 2;
  0, 22, 14, 4;
  0, 36, 24, 6, 1.
		

Crossrefs

Row sums give A291896.
Columns 0-1 give A000007, A186085 (for n>0).

A291930 Row sums of A291929.

Original entry on oeis.org

1, 1, 2, 5, 11, 26, 60, 139, 321, 743, 1716, 3965, 9158, 21152, 48848, 112808, 260500, 601553, 1389096, 3207660, 7406989, 17103860, 39495306, 91200333, 210594475, 486292240, 1122916743, 2592971247, 5987531168, 13826041086, 31926247578, 73722134145, 170234630412
Offset: 0

Views

Author

Seiichi Manyama, Sep 06 2017

Keywords

Crossrefs

A291942 Row sums of A291940.

Original entry on oeis.org

1, 1, -2, 5, -9, 14, -24, 47, -87, 151, -272, 505, -918, 1656, -3020, 5512, -10020, 18221, -33172, 60388, -109899, 199992, -364002, 662529, -1205777, 2194488, -3994057, 7269275, -13230124, 24078998, -43824226, 79760817, -145165804, 264203948, -480855437, 875164374
Offset: 0

Views

Author

Seiichi Manyama, Sep 06 2017

Keywords

Crossrefs

A351106 Triangle read by rows: T(m,n) is the number of simple paths for a Racetrack car (using Moore neighborhood) with initial velocity zero, going from one corner to the diagonally opposite corner on an m X n grid, 1 <= n <= m.

Original entry on oeis.org

1, 1, 3, 1, 6, 23, 2, 17, 118, 1470, 3, 47, 762, 23878, 914525, 5, 133, 5724, 420894, 40285572
Offset: 1

Views

Author

Pontus von Brömssen, Jan 31 2022

Keywords

Examples

			Triangle begins:
  m\n| 1   2    3      4        5  6
  ---+------------------------------
  1  | 1
  2  | 1   3
  3  | 1   6   23
  4  | 2  17  118   1470
  5  | 3  47  762  23878   914525
  6  | 5 133 5724 420894 40285572  ?
		

Crossrefs

Cf. A291896 (column n=1), A329118, A351041, A351107 (main diagonal), A351108, A351110.

A351108 Triangle read by rows: T(m,n) is the number of simple paths for a Racetrack car (using von Neumann neighborhood) with initial velocity zero, going from one corner to the diagonally opposite corner on an m X n grid, 1 <= n <= m.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 2, 2, 3, 8, 3, 3, 7, 12, 40, 5, 7, 13, 26, 160, 1380, 9, 13, 28, 61, 918, 12940, 211164, 14, 27, 61, 161, 7260, 142453, 4997155, 205331148
Offset: 1

Views

Author

Pontus von Brömssen, Feb 01 2022

Keywords

Examples

			Triangle begins:
  m\n|  1  2  3   4    5      6       7         8
  ---+-------------------------------------------
  1  |  1
  2  |  1  0
  3  |  1  1  2
  4  |  2  2  3   8
  5  |  3  3  7  12   40
  6  |  5  7 13  26  160   1380
  7  |  9 13 28  61  918  12940  211164
  8  | 14 27 61 161 7260 142453 4997155 205331148
		

Crossrefs

Cf. A064297, A291896 (column n=1), A351042, A351106, A351109 (main diagonal).
Showing 1-6 of 6 results.