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.

Previous Showing 21-25 of 25 results.

A278180 Square spiral in which each new term is the sum of its two largest neighbors.

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 8, 15, 16, 17, 33, 35, 37, 72, 76, 80, 84, 164, 172, 180, 188, 368, 384, 401, 418, 435, 853, 888, 925, 962, 999, 1961, 2037, 2117, 2201, 2285, 2369, 4654, 4826, 5006, 5194, 5382, 5570, 10952, 11336, 11737, 12155, 12590, 13025, 13460, 26485, 27373, 28298, 29260, 30259, 31258, 32257, 63515
Offset: 1

Views

Author

Omar E. Pol, Nov 14 2016

Keywords

Comments

To evaluate a(n) consider the neighbors of a(n) that are present in the spiral when a(n) should be a new term in the spiral.
For the same idea but for a hexagonal spiral see A278619; and for a right triangle see A278645. It appears that the same idea for an isosceles triangle and also for a square array gives A030237. - Omar E. Pol, Dec 04 2016

Examples

			Illustration of initial terms as a square spiral:
.
.          84----80----76-----72----37
.           |                        |
.          164    4-----3-----2     35
.           |     |           |      |
.          172    7     1-----1     33
.           |     |                  |
.          180    8-----15----16----17
.           |
.          188---368---384---401---418
.
a(21) = 188 because the sum of its two largest neighbors is 180 + 8 = 188.
a(22) = 368 because the sum of its two largest neighbors is 180 + 188 = 368.
a(23) = 384 because the sum of its two largest neighbors is 368 + 16 = 384.
a(24) = 401 because the sum of its two largest neighbors is 384 + 17 = 401.
a(25) = 418 because the sum of its two largest neighbors is 401 + 17 = 418.
a(26) = 435 because the sum of its two largest neighbors is 418 + 17 = 435.
		

Crossrefs

A096465 Triangle (read by rows) formed by setting all entries in the first column and in the main diagonal ((i,i) entries) to 1 and the rest of the entries by the recursion T(n, k) = T(n-1, k) + T(n, k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 1, 1, 4, 8, 9, 1, 1, 5, 13, 22, 23, 1, 1, 6, 19, 41, 64, 65, 1, 1, 7, 26, 67, 131, 196, 197, 1, 1, 8, 34, 101, 232, 428, 625, 626, 1, 1, 9, 43, 144, 376, 804, 1429, 2055, 2056, 1, 1, 10, 53, 197, 573, 1377, 2806, 4861, 6917, 6918, 1, 1, 11, 64, 261, 834, 2211, 5017, 9878, 16795, 23713, 23714, 1
Offset: 0

Views

Author

Gerald McGarvey, Aug 12 2004

Keywords

Comments

The third column is A034856 (binomial(n+1, 2) + n-1).
The row sums are A014137 (partial sums of Catalan numbers (A000108)).
The "1st subdiagonal" ((i+1,i) entries) are also A014137.
The "2nd subdiagonal" ((i+2,i) entries) is A014138 ( Partial sums of Catalan numbers (starting 1,2,5,...)).
The "3rd subdiagonal" ((i+3,i) entries) is A001453 (Catalan numbers - 1.)
This is the reverse of A091491 - see A091491 for more information. The sequence of antidiagonal sums gives A124642. - Gerald McGarvey, Dec 09 2006

Examples

			Triangle begins as:
  1;
  1, 1;
  1, 2,  1;
  1, 3,  4,  1;
  1, 4,  8,  9,   1;
  1, 5, 13, 22,  23,   1;
  1, 6, 19, 41,  64,  65,   1;
  1, 7, 26, 67, 131, 196, 197, 1;
		

Crossrefs

Programs

  • Haskell
    a096465 n k = a096465_tabl !! n !! k
    a096465_row n = a096465_tabl !! n
    a096465_tabl = map reverse a091491_tabl
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Magma
    A096465:= func< n,k | k eq n select 1 else (n-k)*(&+[Binomial(n+k-2*j, n-j)/(n+k-2*j): j in [0..k]]) >;
    [A096465(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 30 2021
    
  • Maple
    A096465:= (n,k)-> `if`(k=n, 1, (n-k)*add(binomial(n+k-2*j, n-j)/(n+k-2*j), j=0..k));
    seq(seq(A096465(n,k), k=0..n), n=0..12) # G. C. Greubel, Apr 30 2021
  • Mathematica
    T[, 0]= 1; T[n, n_]= 1; T[n_, m_]:= T[n, m]= T[n-1, m] + T[n, m-1]; T[n_, m_] /; n < 0 || m > n = 0; Table[T[n, m], {n, 0, 12}, {m, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2012 *)
  • Sage
    def A096465(n,k): return 1 if (k==n) else (n-k)*sum( binomial(n+k-2*j, n-j)/(n+k-2*j) for j in (0..k))
    flatten([[A096465(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 30 2021

Formula

From G. C. Greubel, Apr 30 2021: (Start)
T(n, k) = (n-k) * Sum_{j=0..k} binomial(n+k-2*j, n-j)/(n+k-2*j) with T(n,n) = 1.
T(n, k) = A091491(n, n-k).
Sum_{k=0..n} T(n,k) = Sum_{j=0..n} A000108(j) = A014137(n). (End)

Extensions

Offset changed by Reinhard Zumkeller, Jul 12 2012

A278619 Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its two largest neighbors in the structure.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 15, 18, 22, 26, 31, 36, 42, 49, 56, 64, 72, 82, 94, 106, 121, 139, 157, 179, 205, 231, 262, 298, 334, 376, 425, 481, 537, 601, 673, 745, 827, 921, 1027, 1133, 1254, 1393, 1550, 1707, 1886, 2091, 2322, 2553, 2815, 3113, 3447, 3781, 4157, 4582, 5063, 5600
Offset: 0

Views

Author

Omar E. Pol, Nov 24 2016

Keywords

Comments

To evaluate a(n) consider only the two largest neighbors of a(n) that are present in the spiral when a(n) should be a new term in the spiral.
For the same idea but for an right triangle see A278645; for a square spiral see A278180.
It appears that the same idea for an isosceles triangle and also for a square array gives A030237.

Examples

			Illustration of initial terms as a spiral:
.
.             18 - 15 - 12
.             /          \
.           22    3 - 2   10
.           /    /     \   \
.         26    4   1 - 1   8
.           \    \         /
.           31    5 - 6 - 7
.             \
.              36 - 42 - 49
.
a(16) = 36 because the sum of its two largest neighbors is 31 + 5 = 36.
a(17) = 42 because the sum of its two largest neighbors is 36 + 6 = 42.
a(18) = 49 because the sum of its two largest neighbors is 42 + 7 = 49.
a(19) = 56 because the sum of its two largest neighbors is 49 + 7 = 56.
		

Crossrefs

A355173 The Fuss-Catalan triangle of order 1, read by rows. Related to binary trees.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 5, 0, 1, 4, 9, 14, 0, 1, 5, 14, 28, 42, 0, 1, 6, 20, 48, 90, 132, 0, 1, 7, 27, 75, 165, 297, 429, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 0, 1, 10, 54, 208, 637, 1638, 3640, 7072, 11934, 16796
Offset: 0

Views

Author

Peter Luschny, Jun 25 2022

Keywords

Comments

The Fuss-Catalan triangle of order m is a regular, (0, 0)-based table recursively defined as follows: Set row(0) = [1] and row(1) = [0, 1]. Now assume row(n-1) already constructed and duplicate the last element of row(n-1). Next apply the cumulative sum m times to this list to get row(n). Here m = 1. (See the Python program for a reference implementation.)
This definition also includes the classical Fuss-Catalan numbers, since T(n, n) = A000108(n), or row 2 in A355262. For m = 2 see A355172 and for m = 3 A355174. More generally, for n >= 1 all Fuss-Catalan sequences (A355262(n, k), k >= 0) are the main diagonals of the Fuss-Catalan triangles of order n - 1.

Examples

			Table T(n, k) begins:
  [0] [1]
  [1] [0, 1]
  [2] [0, 1, 2]
  [3] [0, 1, 3,  5]
  [4] [0, 1, 4,  9,  14]
  [5] [0, 1, 5, 14,  28,  42]
  [6] [0, 1, 6, 20,  48,  90,  132]
  [7] [0, 1, 7, 27,  75, 165,  297, 429]
  [8] [0, 1, 8, 35, 110, 275,  572, 1001, 1430]
  [9] [0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862]
Seen as an array reading the diagonals starting from the main diagonal:
  [0] 1, 1, 2,  5,  14,   42,  132,   429,  1430,   4862,   16796, ...  A000108
  [1] 0, 1, 3,  9,  28,   90,  297,  1001,  3432,  11934,   41990, ...  A000245
  [2] 0, 1, 4, 14,  48,  165,  572,  2002,  7072,  25194,   90440, ...  A099376
  [3] 0, 1, 5, 20,  75,  275, 1001,  3640, 13260,  48450,  177650, ...  A115144
  [4] 0, 1, 6, 27, 110,  429, 1638,  6188, 23256,  87210,  326876, ...  A115145
  [5] 0, 1, 7, 35, 154,  637, 2548,  9996, 38760, 149226,  572033, ...  A000588
  [6] 0, 1, 8, 44, 208,  910, 3808, 15504, 62016, 245157,  961400, ...  A115147
  [7] 0, 1, 9, 54, 273, 1260, 5508, 23256, 95931, 389367, 1562275, ...  A115148
		

Crossrefs

A000108 (main diagonal), A000245 (subdiagonal), A002057 (diagonal 2), A000344 (diagonal 3), A000027 (column 2), A000096 (column 3), A071724 (row sums), A000958 (alternating row sums), A262394 (main diagonal of array).
Variants: A009766 (main variant), A030237, A130020.
Cf. A123110 (triangle of order 0), A355172 (triangle of order 2), A355174 (triangle of order 3), A355262 (Fuss-Catalan array).

Programs

  • Python
    from functools import cache
    from itertools import accumulate
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 1]
        row = Trow(n - 1) + [Trow(n - 1)[n - 1]]
        return list(accumulate(row))
    for n in range(11): print(Trow(n))

Formula

The general formula for the Fuss-Catalan triangles is, for m >= 0 and 0 <= k <= n:
FCT(n, k, m) = (m*(n - k) + m + 1)*(m*n + k - 1)!/((m*n + 1)!*(k - 1)!) for k > 0 and FCT(n, 0, m) = 0^n. The case considered here is T(n, k) = FCT(n, k, 1).
T(n, k) = (n - k + 2)*(n + k - 1)!/((n + 1)!*(k - 1)!) for k > 0; T(n, 0) = 0^n.
The g.f. of row n of the FC-triangle of order m is 0^n + (x - (m + 1)*x^2) / (1 - x)^(m*n + 2), thus:
T(n, k) = [x^k] (0^n + (x - 2*x^2)/(1 - x)^(n + 2)).

A278645 Triangle read by rows in which each new term is the sum of its two largest neighbors in the structure.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 8, 15, 22, 29, 23, 45, 74, 103, 132, 68, 142, 245, 377, 509, 641, 210, 455, 832, 1341, 1982, 2623, 3264, 665, 1497, 2838, 4820, 7443, 10707, 13971, 17235, 2162, 5000, 9820, 17263, 27970, 41941, 59176, 76411, 93646, 7162, 16982, 34245, 62215, 104156, 163332, 239743, 333389, 427035, 520681
Offset: 1

Views

Author

Omar E. Pol, Nov 24 2016

Keywords

Comments

To evaluate T(n,k) consider only the two largest neighbors of T(n,k) that are present in the triangle when T(n,k) should be a new term in the triangle.
For the same idea but for a square spiral see A278180; and for a hexagonal spiral see A278619.
It appears that the same idea for an isosceles triangle and also for a square array gives A030237.

Examples

			Triangle begins:
1;
1,    2;
3,    5,     7;
8,    15,    22,    29;
23,   45,    74,    103,   132;
68,   142,   245,   377,   509,    641;
210,  455,   832,   1341,  1982,   2623,   3264;
665,  1497,  2838,  4820,  7443,   10707,  13971,  17235;
2162, 5000,  9820,  17263, 27970,  41941,  59176,  76411,  93646;
7162, 16982, 34245, 62215, 104156, 163332, 239743, 333389, 427035, 520681;
...
		

Crossrefs

Previous Showing 21-25 of 25 results.