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.

A246695 Row sums of the triangular array A246694.

Original entry on oeis.org

1, 3, 9, 18, 35, 57, 91, 132, 189, 255, 341, 438, 559, 693, 855, 1032, 1241, 1467, 1729, 2010, 2331, 2673, 3059, 3468, 3925, 4407, 4941, 5502, 6119, 6765, 7471, 8208, 9009, 9843, 10745, 11682, 12691, 13737, 14859, 16020, 17261, 18543, 19909, 21318, 22815
Offset: 0

Views

Author

Clark Kimberling, Sep 01 2014

Keywords

Comments

Also partial sums of A257083. - Reinhard Zumkeller, Apr 17 2015

Examples

			First 5 rows of A246694 preceded by sums
sum = 1: ...... 1
sum = 3: ...... 1 ... 2
sum = 9: ...... 3 ... 2 ... 4
sum = 18: ..... 3 ... 5 ... 4 ... 6
sum = 35: ..... 7 ... 5 ... 8 ... 6 ... 9
		

Crossrefs

Programs

  • Haskell
    a246695 n = a246695_list !! n
    a246695_list = scanl1 (+) a257083_list
    -- Reinhard Zumkeller, Apr 17 2015
  • Mathematica
    z = 25; t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 2;
    t[n_, 0] := If[OddQ[n], t[n - 1, n - 2] + 1, t[n - 1, n - 1] + 1];
    t[n_, 1] := If[OddQ[n], t[n - 1, n - 1] + 1, t[n - 1, n - 2] + 1];
    t[n_, k_] := t[n, k - 2] + 1; A246695 = Table[Sum[t[n, k], {k, 0, n}], {n, 0, z}]

Formula

Conjectured linear recurrence: a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(0) = 1, a(1) = 3, a(2) = 9, a(3) = 18, a(4) = 35, a(5) = 57, a(6) = 91.
Conjectured g.f.: (1 + x + 2*x^2 + x^3 + x^4)/((x - 1)^4*(x + 1)^2).
Conjecture: a(n) = (1/8)*(n + 1)*((-1)^n + 2*n^2 + 4*n + 7). - Eric Simon Jacob, Jul 19 2023 [This conjecture is correct; compare A377802, note offset 1. - Werner Schulte, Nov 22 2024]

Extensions

Corrected and edited by M. F. Hasler, Nov 17 2014

A246705 Position of first n in A246694 (read as sequence with offset changed to 1); complement of A246706.

Original entry on oeis.org

1, 3, 4, 6, 8, 10, 11, 13, 15, 17, 19, 21, 22, 24, 26, 28, 30, 32, 34, 36, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 106, 108, 110, 112, 114, 116, 118
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2014

Keywords

Examples

			A246694 begins with 1, 1, 2, 3, 2, 4, 3, 5, 4, 6, 7, 5, 8, 6, 9, 7, so that, for a(n) = position of first n and b(n) = position of last n, we have a = (1,3,4,6,8,10,...) and b = (2,5,7,9,12,...).
Note, however, that A246694 has offset 0, so the values here are off by 1 from the positions as given by the indices (b-file or list) in that sequence. - _M. F. Hasler_, Nov 17 2014
		

Crossrefs

Programs

  • Mathematica
    z = 25; t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 2;
    t[n_, 0] := If[OddQ[n], t[n - 1, n - 2] + 1, t[n - 1, n - 1] + 1];
    t[n_, 1] := If[OddQ[n], t[n - 1, n - 1] + 1, t[n - 1, n - 2] + 1];
    t[n_, k_] := t[n, k - 2] + 1;
    u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]]; (*A246694*)
    w[n_] := Flatten[Position[u, n]]; A246705 = Table[First[w[n]], {n, 1, 3*z}]

A246706 Position of last n in A246694 (read as a sequence, with offset changed to 1); complement of A246705.

Original entry on oeis.org

2, 5, 7, 9, 12, 14, 16, 18, 20, 23, 25, 27, 29, 31, 33, 35, 38, 40, 42, 44, 46, 48, 50, 52, 54, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2014

Keywords

Comments

Note that A246694 has offset 0, so the values here are off by 1 from the positions as given by the indices (b-file or list) in that sequence. - M. F. Hasler, Nov 17 2014

Examples

			A246694 begins with 1, 1, 2, 3, 2, 4, 3, 5, 4, 6, 7, 5, 8, 6, 9, 7, so that, for a(n) = position of first n and b(n) = position of last n, we have a = (1,3,4,6,8,10,...) and b = (2,5,7,9,12,...).
		

Crossrefs

Programs

  • Mathematica
    z = 25; t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 2;
    t[n_, 0] := If[OddQ[n], t[n - 1, n - 2] + 1, t[n - 1, n - 1] + 1];
    t[n_, 1] := If[OddQ[n], t[n - 1, n - 1] + 1, t[n - 1, n - 2] + 1];
    t[n_, k_] := t[n, k - 2] + 1;
    u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]]; (*A246694*)
    w[n_] := Flatten[Position[u, n]]; A246706 = Table[Last[w[n]], {n, 1, 3*z}]

A246697 Row sums of the triangular array A246696.

Original entry on oeis.org

1, 5, 16, 34, 67, 111, 178, 260, 373, 505, 676, 870, 1111, 1379, 1702, 2056, 2473, 2925, 3448, 4010, 4651, 5335, 6106, 6924, 7837, 8801, 9868, 10990, 12223, 13515, 14926, 16400, 18001, 19669, 21472, 23346, 25363, 27455, 29698, 32020, 34501, 37065, 39796
Offset: 0

Views

Author

Clark Kimberling, Sep 02 2014

Keywords

Examples

			First 5 rows of A246694 preceded by sums
sum = 1: ...... 1;
sum = 5: ...... 2 ... 3;
sum = 16: ..... 5 ... 4 ... 7;
sum = 34: ..... 6 ... 9 ... 8 ... 11;
sum = 67: ..... 13 .. 10 .. 15 .. 12 .. 17.
		

Crossrefs

Programs

  • Mathematica
    z = 25; t[0, 0] = 1; t[1, 0] = 2; t[1, 1] = 3; t[n_, 0] := t[n, 0] = If[OddQ[n], t[n - 1, n - 2] + 2, t[n - 1, n - 1] + 2]; t[n_, 1] := t[n, 1] = If[OddQ[n], t[n - 1, n - 1] + 2, t[n - 1, n - 2] + 2]
    t[n_, k_] := t[n, k] = t[n, k - 2] + 2;
    u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]] (* A246696 *)
    Table[Sum[t[n, k], {k, 0, n}], {n, 0, 2*z}] (* A246697 *)

Formula

Conjectured linear recurrence: a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(0) = 1, a(1) = 5, a(2) = 16, a(3) = 34, a(4) = 67, a(5) = 111, a(6) = 178.
Conjectured g.f.: (1 + 3*x + 5*x^2 + x^3 + 2*x^4)/((x - 1)^4*(x + 1)^2).
Conjecture: a(n) = (2*n^3+6*n^2+9*n+4+n*(-1)^n)/4. - Luce ETIENNE, Oct 16 2016
Conjectured e.g.f.: ((2 + 8*x + 6*x^2 + x^3)*cosh(x) + (2 + 9*x + 6*x^2 + x^3)*sinh(x))/2. - Stefano Spezia, May 10 2021

Extensions

Corrected and edited by M. F. Hasler, Nov 17 2014

A246696 Triangle t(n,k) = t(n,k-2) + 2 if n > 1 and 2 <= k <= n; t(0,0) = 1, t(1,0) = 2, t(1,1) = 3; if n > 1 is odd, then t(n,0) = t(n-1,n-2) + 2 and t(n,1) = t(n-1,n-1) + 2; if n > 1 is even, then t(n,0) = t(n-1,n-1) + 2 and t(n,1) = t(n-1,n-2) + 2.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 9, 8, 11, 13, 10, 15, 12, 17, 14, 19, 16, 21, 18, 23, 25, 20, 27, 22, 29, 24, 31, 26, 33, 28, 35, 30, 37, 32, 39, 41, 34, 43, 36, 45, 38, 47, 40, 49, 42, 51, 44, 53, 46, 55, 48, 57, 50, 59, 61, 52, 63, 54, 65, 56, 67, 58, 69, 60, 71, 62
Offset: 0

Views

Author

Clark Kimberling, Sep 17 2014

Keywords

Comments

As an array, for each m, row 2*m has m even numbers and [(m+1)/2] odd numbers, and row 2*m-1 has m odds and m evens. Every positive number occurs exactly once, so that as a sequence (with offset 1), this is a permutation of the positive integers, with inverse A246698.

Examples

			First 8 rows:
1
2 ... 3
5 ... 4 ... 7
6 ... 9 ... 8 ... 11
13 .. 10 .. 15 .. 12 .. 17
14 .. 19 .. 16 .. 21 .. 18 .. 23
25 .. 20 .. 27 .. 22 .. 29 .. 24 .. 31
26 .. 33 .. 28 .. 35 .. 30 .. 37 .. 32 .. 39
		

Crossrefs

Cf. A246697 (row sums), A246698 (inverse permutation), A246694.
Cf. A001844, A047838 (main diagonal), A128174 (parity).

Programs

  • Mathematica
    z = 25; t[0, 0] = 1; t[1, 0] = 2; t[1, 1] = 3; t[n_, 0] := t[n, 0] = If[OddQ[n], t[n - 1, n - 2] + 2, t[n - 1, n - 1] + 2]; t[n_, 1] := t[n, 1] = If[OddQ[n], t[n - 1, n - 1] + 2, t[n - 1, n - 2] + 2]; t[n_, k_] := t[n, k] = t[n, k - 2] + 2;
    u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]] (* A246696 *)

Formula

For m >= 0, {t(2*m,0)} = A001844. - Ruud H.G. van Tol, Sep 30 2024

Extensions

Edited by M. F. Hasler, Nov 17 2014

A377802 Triangle read by rows: T(n, k) = (2 * (n+1)^2 + 7 - (-1)^n) / 8 - k.

Original entry on oeis.org

1, 2, 1, 4, 3, 2, 6, 5, 4, 3, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 16, 15, 14, 13, 12, 11, 10, 20, 19, 18, 17, 16, 15, 14, 13, 25, 24, 23, 22, 21, 20, 19, 18, 17, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31
Offset: 1

Views

Author

Werner Schulte, Nov 07 2024

Keywords

Comments

The natural numbers, based on quarter-squares (A002620 and A033638); every natural number occurs exactly twice.

Examples

			Triangle T(n, k) for 1 <= k <= n starts:
n\ k :   1   2   3   4   5   6   7   8   9  10  11  12  13
==========================================================
   1 :   1
   2 :   2   1
   3 :   4   3   2
   4 :   6   5   4   3
   5 :   9   8   7   6   5
   6 :  12  11  10   9   8   7
   7 :  16  15  14  13  12  11  10
   8 :  20  19  18  17  16  15  14  13
   9 :  25  24  23  22  21  20  19  18  17
  10 :  30  29  28  27  26  25  24  23  22  21
  11 :  36  35  34  33  32  31  30  29  28  27  26
  12 :  42  41  40  39  38  37  36  35  34  33  32  31
  13 :  49  48  47  46  45  44  43  42  41  40  39  38  37
  etc.
		

Crossrefs

A002620 (column 1), A024206 (column 2), A014616 (column 3), A004116 (column 4), A033638 (main diagonal), A290743 (1st subdiagonal).

Programs

  • PARI
    T(n,k)=(2*(n+1)^2+7-(-1)^n)/8-k

Formula

T(n, k) = A002620(n+1) + 1 - k.
T(2*n-1, n) = n^2 - n + 1 = A002061(n); T(2*n-2, n) = (n-1)^2 = A000290(n-1) for n > 1; T(2*n-3, n) = (n-1) * (n-2) = A002378(n-2) for n > 2; T(2*n-4, n) = (n-1) * (n-3) = A005563(n-3) for n > 3.
Row sums are (2 * n^3 + 5 * n - n * (-1)^n) / 8 = (A006003(n) + A026741(n)) / 2.
G.f.: x*y*(1 - x*y + x^2*y + x^4*y^2 - x^5*y^3 + x^6*y^3 - x^3*y*(1 + 2*y - y^2))/((1 - x)^3*(1 + x)*(1 - x*y)^3*(1 + x*y)). - Stefano Spezia, Nov 08 2024
Showing 1-6 of 6 results.