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 11-20 of 20 results.

A323222 A(n, k) = [x^k] (1 - 4*x)^(-n/2)*x/(1 - x), square array read by ascending antidiagonals with n >= 0 and k >= 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 5, 9, 1, 0, 1, 7, 21, 29, 1, 0, 1, 9, 37, 85, 99, 1, 0, 1, 11, 57, 177, 341, 351, 1, 0, 1, 13, 81, 313, 807, 1365, 1275, 1, 0, 1, 15, 109, 501, 1593, 3579, 5461, 4707, 1, 0, 1, 17, 141, 749, 2811, 7737, 15591, 21845, 17577, 1
Offset: 0

Views

Author

Peter Luschny, Jan 24 2019

Keywords

Comments

General asymptotic formula for g.f. (1 - 4*x)^(-j/2)*x/(1 - x) and fixed j>0 is a(n) ~ n^(j/2 - 1) * 4^n / (3*Gamma(j/2)). - Vaclav Kotesovec, Jan 29 2019

Examples

			[n\k] 0  1   2    3     4      5       6       7        8         9
-------------------------------------------------------------------
[0]   0, 1,  1,   1,    1,     1,      1,      1,       1,        1, ... A057427
[1]   0, 1,  3,   9,   29,    99,    351,   1275,    4707,    17577, ... A006134
[2]   0, 1,  5,  21,   85,   341,   1365,   5461,   21845,    87381, ... A002450
[3]   0, 1,  7,  37,  177,   807,   3579,  15591,   67071,   285861, ... A277178
[4]   0, 1,  9,  57,  313,  1593,   7737,  36409,  167481,   757305, ... A014916
[5]   0, 1, 11,  81,  501,  2811,  14823,  74883,  366603,  1752273, ... A323223
[6]   0, 1, 13, 109,  749,  4589,  26093, 140781,  730605,  3679725, ...
[7]   0, 1, 15, 141, 1065,  7071,  43107, 247311, 1355847,  7175661, ...
[8]   0, 1, 17, 177, 1457, 10417,  67761, 411825, 2377905, 13191345, ...
[9]   0, 1, 19, 217, 1933, 14803, 102319, 656587, 3982195, 23104441, ...
Triangle given by antidiagonals:
0;
0, 1;
0, 1,  1;
0, 1,  3,   1;
0, 1,  5,   9,   1;
0, 1,  7,  21,  29,    1;
0, 1,  9,  37,  85,   99,    1;
0, 1, 11,  57, 177,  341,  351,    1;
0, 1, 13,  81, 313,  807, 1365, 1275,    1;
0, 1, 15, 109, 501, 1593, 3579, 5461, 4707, 1;
		

Crossrefs

Sums of antidiagonals are A323217. Main diagonal is A323219.
Rows: A057427 (n=0), A006134 (n=1), A002450 (n=2), A277178 (n=3), A014916 (n=4), A323223 (n=5).
Columns: A005408 (k=2), A059993 (k=3), A323218 (k=4).
Similar array based on Catalan numbers is A323224.

Programs

  • Maple
    Row := proc(n, len) local ogf, ser; ogf := (1 - 4*x)^(-n/2)*x/(1 - x);
    ser := series(ogf, x, (n+1)*len+1); seq(coeff(ser, x, j), j=0..len) end:
    for n from 0 to 9 do Row(n, 9) od;
  • Mathematica
    BF[N_, K_] := Module[{}, r[n_, k_] := FrobeniusSolve[ConstantArray[1, n], k];
    X[n_] := Flatten[Table[r[N, j], {j, 0, n - 1}], 1];
    CentralBinomial[n_] := Binomial[2 n, n];
    Sum[Product[CentralBinomial[m[[i]]], {i, 1, N}], {m , X[K]}]];
    Trow[n_] := Table[BF[n, k], {k, 0, 9}]; Table[Trow[n], {n, 1, 9}]

Formula

For n>0 and k>0 let X(n, k) denote the set of all tuples of length n with elements from {0, ..., k-1} with sum < k. Let b(m) = binomial(2*m, m). Then A(n, k) = Sum_{(j1,...,jn) in X(n, k)} b(j1)*b(j2)*...*b(jn).

A211394 T(n,k) = (k+n)*(k+n-1)/2-(k+n-1)*(-1)^(k+n)-k+2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 08 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). The order of the list:
T(1,1)=1;
T(1,3), T(2,2), T(3,1);
T(1,2), T(2,1);
. . .
T(1,n), T(2,n-1), T(3,n-2), ... T(n,1);
T(1,n-1), T(2,n-3), T(3,n-4),...T(n-1,1);
. . .
First row matches with the elements antidiagonal {T(1,n), ... T(n,1)},
second row matches with the elements antidiagonal {T(1,n-1), ... T(n-1,1)}.
Table contains:
row 1 is alternation of elements A130883 and A096376,
row 2 accommodates elements A033816 in even places,
row 3 accommodates elements A100037 in odd places,
row 5 accommodates elements A100038 in odd places;
column 1 is alternation of elements A084849 and A000384,
column 2 is alternation of elements A014106 and A014105,
column 3 is alternation of elements A014107 and A091823,
column 4 is alternation of elements A071355 and |A168244|,
column 5 accommodates elements A033537 in even places,
column 7 is alternation of elements A100040 and A130861,
column 9 accommodates elements A100041 in even places;
the main diagonal is A058331,
diagonal 1, located above the main diagonal is A001844,
diagonal 2, located above the main diagonal is A001105,
diagonal 3, located above the main diagonal is A046092,
diagonal 4, located above the main diagonal is A056220,
diagonal 5, located above the main diagonal is A142463,
diagonal 6, located above the main diagonal is A054000,
diagonal 7, located above the main diagonal is A090288,
diagonal 9, located above the main diagonal is A059993,
diagonal 10, located above the main diagonal is |A147973|,
diagonal 11, located above the main diagonal is A139570;
diagonal 1, located under the main diagonal is A051890,
diagonal 2, located under the main diagonal is A005893,
diagonal 3, located under the main diagonal is A097080,
diagonal 4, located under the main diagonal is A093328,
diagonal 5, located under the main diagonal is A137882.

Examples

			The start of the sequence as table:
  1....5...2..12...7..23..16...
  6....3..13...8..24..17..39...
  4...14...9..25..18..40..31...
  15..10..26..19..41..32..60...
  11..27..20..42..33..61..50...
  28..21..43..34..62..51..85...
  22..44..35..63..52..86..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  5,6;
  2,3,4;
  12,13,14,15;
  7,8,9,10,11;
  23,24,25,26,27,28;
  16,17,18,19,20,21,22;
  . . .
Row number r matches with r numbers segment {(r+1)*r/2-r*(-1)^(r+1)-r+2,... (r+1)*r/2-r*(-1)^(r+1)+1}.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := (n+k)(n+k-1)/2 - (-1)^(n+k)(n+k-1) - k + 2;
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    j=(t*t+3*t+4)/2-n
    result=(t+2)*(t+1)/2-(t+1)*(-1)**t-j+2

Formula

T(n,k) = (k+n)*(k+n-1)/2-(k+n-1)*(-1)^(k+n)-k+2.
As linear sequence
a(n) = A003057(n)*A002024(n)/2- A002024(n)*(-1)^A003056(n)-A004736(n)+2.
a(n) = (t+2)*(t+1)/2 - (t+1)*(-1)^t-j+2, where j=(t*t+3*t+4)/2-n and t=int((math.sqrt(8*n-7) - 1)/ 2).

A213197 T(n,k) = (2*(n+k)^2 - 2*(n+k) - 4*k + 6 + (2*k-2)*(-1)^n + (2*k-1)*(-1)^k + (-2*n+1)*(-1)^(n+k))/4; n, k > 0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Mar 01 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). Let m be natural number. The order of the list:
T(1,1)=1;
T(3,1), T(2,2), T(1,3);
T(2,1), T(1,2);
...
T(1,2*m+1), T(1,2*m), T(2, 2*m-1), T(3, 2*m-1),... T(2*m,1), T(2*m+1,1);
T(2*m,2), T(2*m-2,4), ...T(2,2*m);
...
Movement along two adjacent antidiagonals. The first row consists of phases: step to the west, step to the southwest, step to the south. The second row consists of phases: 2 steps to the north, 2 steps to the east. The length of each step is 1.

Examples

			The start of the sequence as a table:
   1,  3,  2,  8,  7, 17, 16, ...
   4,  6,  9, 15, 18, 28, 31, ...
   5, 11, 10, 20, 19, 33, 32, ...
  12, 14, 21, 27, 34, 44, 51, ...
  13, 23, 22, 36, 35, 53, 52, ...
  24, 26, 37, 43, 54, 64, 75, ...
  25, 39, 38, 56, 55, 77, 76, ...
  ...
The start of the sequence as a triangular array read by rows:
   1;
   3,  4;
   2,  6,  5;
   8,  9, 11, 12;
   7, 15, 10, 14, 13;
  17, 18, 20, 21, 23, 24;
  16, 28, 19, 27, 22, 26, 25;
  ...
The start of the sequence as an array read by rows, the length of row r is 4*r-3.
First 2*r-2 numbers are from row 2*r-2 of the triangular array above.
Last  2*r-1 numbers are from row 2*r-1 of the triangular array above.
   1;
   3,  4,  2,  6,  5;
   8,  9, 11, 12,  7, 15, 10, 14, 13;
  17, 18, 20, 21, 23, 24, 16, 28, 19, 27, 22, 26, 25;
  ...
Row r contains permutation of 4*r-3 numbers from 2*r*r-5*r+4 to 2*r*r-r:
2*r*r-5*r+5, 2*r*r-5*r+6, ..., 2*r*r-2*r+2, 2*r*r-2*r+1.
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->(2*(n+k)^2-2*(n+k)-4*k+6+(2*k-2)*(-1)^n+(2*k-1)*(-1)^k+(1-+2*n)*(-1)^(n+k))/4: seq(seq(T(k,n-k),k=1..n-1),n=1..13); # Muniru A Asiru, Dec 06 2018
  • Mathematica
    T[n_, k_] := (2(n+k)^2 - 2(n+k) - 4k + 6 + (2k-2)(-1)^n + (2k-1)(-1)^k + (-2n+1)(-1)^(n+k))/4;
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=(2*(t+2)**2-2*(t+2)-4*j+6 +(2*j-2)*(-1)**i+(2*j-1)*(-1)**j+(-2*i+1)*(-1)**t)/4

Formula

As a table:
T(n,k) = (2*(n+k)^2 - 2*(n+k) - 4*k + 6 + (2*k-2)*(-1)^n + (2*k-1)*(-1)^k + (-2*n+1)*(-1)^(n+k))/4.
As a linear sequence:
a(n) = (2*A003057(n)^2 - 2*A003057(n) - 4*A004736(n) + 6 + (2*A004736(n)-2)*(-1)^A002260(n) + (2*A004736(n)-1)*(-1)^A004736(n) + (-2*A002260(n)+1)*(-1)^A003056(n))/4;
a(n) = (2*(t+2)^2 - 2*(t+2) - 4*j + 6 + (2*j-2)*(-1)^i + (2*j-1)*(-1)^j + (-2*i+1)*(-1)^t)/4, where i = n - t*(t+1)/2, j = (t*t + 3*t + 4)/2 - n, t = floor((-1+sqrt(8*n-7))/2).

A166873 a(n) = a(n-1) + 12*n for n > 1; a(1) = 1.

Original entry on oeis.org

1, 25, 61, 109, 169, 241, 325, 421, 529, 649, 781, 925, 1081, 1249, 1429, 1621, 1825, 2041, 2269, 2509, 2761, 3025, 3301, 3589, 3889, 4201, 4525, 4861, 5209, 5569, 5941, 6325, 6721, 7129, 7549, 7981, 8425, 8881, 9349, 9829, 10321, 10825, 11341, 11869
Offset: 1

Views

Author

Klaus Brockhaus, Oct 22 2009

Keywords

Comments

Binomial transform of 1,24,12,0,0,0,....

Crossrefs

Cf. A008594 (multiples of 12).
A000217, A028387, A133694, A059993, A166137, A166143, A166146, A166147, A166148, A166150, A166144 have recurrence a(n-1)+k*n with a(1)=1 or a(0)=1 for k = 1..11 resp.

Programs

  • Magma
    [ n eq 1 select 1 else Self(n-1)+12*n: n in [1..44] ];
    
  • Mathematica
    LinearRecurrence[{3,-3,1},{1,25,61},50] (* G. C. Greubel, May 27 2016 *)
  • PARI
    a(n)=6*n^2+6*n-11 \\ Charles R Greathouse IV, Jun 17 2017

Formula

a(n) = 6*n^2 + 6*n - 11.
a(n) = 2*a(n-1) - a(n-2) + 12.
G.f.: x*(1 + 22*x - 11*x^2)/(1-x)^3.
a(n) - a(n-1) = A008594(n) for n > 1.
From G. C. Greubel, May 27 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
E.g.f.: (-11 + 12*x + 6*x^2)*exp(x) + 11. (End)

A294774 a(n) = 2*n^2 + 2*n + 5.

Original entry on oeis.org

5, 9, 17, 29, 45, 65, 89, 117, 149, 185, 225, 269, 317, 369, 425, 485, 549, 617, 689, 765, 845, 929, 1017, 1109, 1205, 1305, 1409, 1517, 1629, 1745, 1865, 1989, 2117, 2249, 2385, 2525, 2669, 2817, 2969, 3125, 3285, 3449, 3617, 3789, 3965, 4145, 4329, 4517, 4709, 4905
Offset: 0

Views

Author

Bruno Berselli, Nov 08 2017

Keywords

Comments

This is the case k = 9 of 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 (similar sequences are listed in Crossrefs section). Note that:
2*( 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 ) - k = ( 2*n + (1-(-1)^k)/2 )^2. From this follows an alternative definition for the sequence: Numbers h such that 2*h - 9 is a square. Therefore, if a(n) is a square then its base is a term of A075841.

Crossrefs

1st diagonal of A154631, 3rd diagonal of A055096, 4th diagonal of A070216.
Second column of Mathar's array in A016813 (Comments section).
Subsequence of A001481, A001983, A004766, A020668, A046711 and A057653 (because a(n) = (n+2)^2 + (n-1)^2); A097268 (because it is also a(n) = (n^2+n+3)^2 - (n^2+n+2)^2); A047270; A243182 (for y=1).
Similar sequences (see the first comment): A161532 (k=-14), A181510 (k=-13), A152811 (k=-12), A222182 (k=-11), A271625 (k=-10), A139570 (k=-9), (-1)*A147973 (k=-8), A059993 (k=-7), A268581 (k=-6), A090288 (k=-5), A054000 (k=-4), A142463 or A132209 (k=-3), A056220 (k=-2), A046092 (k=-1), A001105 (k=0), A001844 (k=1), A058331 (k=2), A051890 (k=3), A271624 (k=4), A097080 (k=5), A093328 (k=6), A271649 (k=7), A255843 (k=8), this sequence (k=9).

Programs

  • Maple
    seq(2*n^2 + 2*n + 5, n=0..100); # Robert Israel, Nov 10 2017
  • Mathematica
    Table[2n^2+2n+5,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{5,9,17},50] (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    Vec((5 - 6*x + 5*x^2) / (1 - x)^3 + O(x^50)) \\ Colin Barker, Nov 13 2017

Formula

O.g.f.: (5 - 6*x + 5*x^2)/(1 - x)^3.
E.g.f.: (5 + 4*x + 2*x^2)*exp(x).
a(n) = a(-1-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 5*A000217(n+1) - 6*A000217(n) + 5*A000217(n-1).
n*a(n) - Sum_{j=0..n-1} a(j) = A002492(n) for n>0.
a(n) = Integral_{x=0..2n+4} |3-x| dx. - Pedro Caceres, Dec 29 2020

A199855 Inverse permutation to A210521.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 04 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). The order of the list:
T(1,1)=1;
T(2,1), T(2,2), T(1,2), T(1,3), T(3,1),
...
T(2,n-1), T(4,n-3), T(6,n-5), ..., T(n,1),
T(2,n), T(4,n-2), T(6,n-4), ..., T(n,2),
T(1,n), T(3,n-2), T(5,n-4), ..., T(n-1,2),
T(1,n+1), T(3,n-1), T(5,n-3), ..., T(n+1,1),
...
The order of the list elements of adjacent antidiagonals. Let m be a positive integer.
Movement by antidiagonal {T(1,2*m), T(2*m,1)} from T(2,2*m-1) to T(2*m,1) length of step is 2,
movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(2,2*m) to T(2*m,2) length of step is 2,
movement by antidiagonal {T(1,2*m), T(2*m,1)} from T(1,2*m) to T(2*m-1,2) length of step is 2,
movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(1,2*m+1) to T(2*m+1,1) length of step is 2.
Table contains:
row 1 is alternation of elements A001844 and A084849,
row 2 is alternation of elements A130883 and A058331,
row 3 is alternation of elements A051890 and A096376,
row 4 is alternation of elements A033816 and A005893,
row 6 is alternation of elements A100037 and A093328;
row 5 accommodates elements A097080 in odd places,
row 7 accommodates elements A137882 in odd places,
row 10 accommodates elements A100038 in odd places,
row 14 accommodates elements A100039 in odd places;
column 1 is A093005 and alternation of elements A000384 and A001105,
column 2 is alternation of elements A046092 and A014105,
column 3 is A105638 and alternation of elements A014106 and A056220,
column 4 is alternation of elements A142463 and A014107,
column 5 is alternation of elements A091823 and A054000,
column 6 is alternation of elements A090288 and |A168244|,
column 8 is alternation of elements A059993 and A033537;
column 7 accommodates elements A071355 in odd places,
column 9 accommodates elements |A147973| in even places,
column 10 accommodates elements A139570 in odd places,
column 13 accommodates elements A130861 in odd places.

Examples

			The start of the sequence as table:
   1,  4,  5,  11,  13,  22,  25,  37,  41,  56,  61, ...
   2,  3,  7,   9,  16,  19,  29,  33,  46,  51,  67, ...
   6, 12, 14,  23,  26,  38,  42,  57,  62,  80,  86, ...
   8, 10, 17,  20,  30,  34,  47,  52,  68,  74,  93, ...
  15, 24, 27,  39,  43,  58,  63,  81,  87, 108, 115, ...
  18, 21, 31,  35,  48,  53,  69,  75,  94, 101. 123, ...
  28, 40, 44,  59,  64,  82,  88, 109, 116, 140, 148, ...
  32, 36, 49,  54,  70,  76,  95, 102, 124, 132, 157, ...
  45, 60, 65,  83,  89, 110, 117, 141, 149, 176, 185, ...
  50, 55, 71,  77,  96, 103, 125, 133, 158, 167, 195, ...
  66, 84, 90, 111, 118, 142, 150, 177, 186, 216, 226, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   4,  2;
   5,  3,  6;
  11,  7, 12,  8;
  13,  9, 14, 10, 15;
  22, 16, 23, 17, 24, 18;
  25, 19, 26, 20, 27, 21, 28;
  37, 29, 38, 30, 39, 31, 40, 32;
  41, 33, 42, 34, 43, 35, 44, 36, 45;
  56, 46, 57, 47, 58, 48, 59, 49, 60, 50;
  61, 51, 62, 52, 63, 53, 64, 54, 65, 55, 66;
  ...
The start of the sequence as array read by rows, the length of row r is 4*r-3.
First 2*r-2 numbers are from the row number 2*r-2 of  triangle array, located above.
Last  2*r-1 numbers are from the row number 2*r-1 of  triangle array, located above.
   1;
   4, 2, 5, 3, 6;
  11, 7,12, 8,13, 9,14,10,15;
  22,16,23,17,24,18,25,19,26,20,27,21,28;
  37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45;
  56,46,57,47,58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66;
  ...
Row number r contains permutation numbers 4*r-3 from 2*r*r-5*r+4 to 2*r*r-r:
2*r*r-3*r+2,2*r*r-5*r+4, 2*r*r-3*r+3, 2*r*r-5*r+5, 2*r*r-3*r+4, 2*r*r-5*r+6, ..., 2*r*r-3*r+1, 2*r*r-r.
...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=(2*j**2+(4*i-5)*j+2*i**2-3*i+2+(2+(-1)**j)*((1-(t+1)*(-1)**i)))/4

Formula

T(n,k) = (2*k^2+(4*n-5)*k+2*n^2-3*n+2+(2+(-1)^k)*((1-(k+n-1)*(-1)^i)))/4.
a(n) = (2*j^2+(4*i-5)*j+2*i^2-3*i+2+(2+(-1)^j)*((1-(t+1)*(-1)^i)))/4, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((sqrt(8*n-7) - 1)/2).

A221216 T(n,k) = ((n+k)^2-2*(n+k)+4-(3*n+k-2)*(-1)^(n+k))/2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 22 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). Let m be natural number. The order of the list:
T(1,1)=1;
T(3,1), T(2,2), T(1,3);
T(1,2), T(2,1);
. . .
T(2*m+1,1), T(2*m,2), T(2*m-1,3),...T(2,2*m), T(1,2*m+1);
T(1,2*m), T(2,2*m-1), T(3,2*m-2),...T(2*m-1,2),T(2*m,1);
. . .
First row contains antidiagonal {T(1,2*m+1), ... T(2*m+1,1)}, read upwards.
Second row contains antidiagonal {T(1,2*m), ... T(2*m,1)}, read downwards.

Examples

			The start of the sequence as table:
  1....5...4..12..11..23..22...
  6....3..13..10..24..21..39...
  2...14...9..25..20..40..35...
  15...8..26..19..41..34..60...
  7...27..18..42..33..61..52...
  28..17..43..32..62..51..85...
  16..44..31..63..50..86..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  5,6;
  4,3,2;
  12,13,14,15;
  11,10,9,8,7;
  23,24,25,26,27,28;
  22,21,20,19,18,17,16;
  . . .
Row number r consecutive contains r numbers.
If r is odd,  row is decreasing.
If r is even, row is increasing.
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-2*(t+2)+4-(3*i+j-2)*(-1)**t)/2

Formula

As table
T(n,k) = ((n+k)^2-2*(n+k)+4-(3*n+k-2)*(-1)^(n+k))/2.
As linear sequence
a(n) = (A003057(n)^2-2*A003057(n)+4-(3*A002260(n)+A004736(n)-2)*(-1)^A003056(n))/2; a(n) = ((t+2)^2-2*(t+2)+4-(i+3*j-2)*(-1)^t)/2,
where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A221217 T(n,k) = ((n+k)^2-2*n+3-(n+k-1)*(1+2*(-1)^(n+k)))/2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 22 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). Let m be natural number. The order of the list:
T(1,1)=1;
T(3,1), T(2,2), T(1,3);
T(2,1), T(1,2);
. . .
T(2*m+1,1), T(2*m,2), T(2*m-1,3),...T(1,2*m+1);
T(2*m,1), T(2*m-1,2), T(2*m-2,3),...T(1,2*m);
. . .
First row contains antidiagonal {T(1,2*m+1), ... T(2*m+1,1)}, read upwards.
Second row contains antidiagonal {T(1,2*m), ... T(2*m,1)}, read upwards.

Examples

			The start of the sequence as table:
  1....6...4..15..11..28..22...
  5....3..14..10..27..21..44...
  2...13...9..26..20..43..35...
  12...8..25..19..42..34..63...
  7...24..18..41..33..62..52...
  23..17..40..32..61..51..86...
  16..39..31..60..50..85..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  6,5;
  4,3,2;
  15,14,13,12;
  11,10,9,8,7;
  28,27,26,25,24,23;
  22,21,20,19,18,17,16;
  . . .
Row number r consecutive contains r numbers in decreasing order.
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-2*i+3-(t+1)*(1+2*(-1)**t))/2

Formula

As table
T(n,k) = ((n+k)^2-2*n+3-(n+k-1)*(1+2*(-1)^(n+k)))/2.
As linear sequence
a(n) = (A003057(n)^2-2*A002260(n)+3-A002024(n)*(1+2*(-1)^A003056(n)))/2;
a(n) = ((t+2)^2-2*i+3-(t+1)*(1+2*(-1)**t))/2, where i=n-t*(t+1)/2,
j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

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

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 9, 1, 1, 7, 21, 31, 1, 1, 9, 37, 89, 121, 1, 1, 11, 57, 183, 393, 515, 1, 1, 13, 81, 321, 897, 1805, 2321, 1, 1, 15, 109, 511, 1729, 4431, 8557, 10879, 1, 1, 17, 141, 761, 3001, 9161, 22149, 41585, 52465, 1, 1, 19, 177, 1079, 4841, 17003, 48313, 112047, 206097, 258563, 1
Offset: 0

Views

Author

Petros Hadjicostas, Aug 05 2020

Keywords

Comments

This is J. M. Bergot's triangular array described in A104858 with the top vertex of the triangle shifted from (1,1) to (0,0).

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
  1;
  1,  1;
  1,  3,   1;
  1,  5,   9,   1;
  1,  7,  21,  31,    1;
  1,  9,  37,  89,  121,    1;
  1, 11,  57, 183,  393,  515,    1;
  1, 13,  81, 321,  897, 1805, 2321,     1;
  1, 15, 109, 511, 1729, 4431, 8557, 10879, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A336858row := proc(n) option remember; local T, k, row;
    row := Array(0..n, fill=1);
    if n = 0 then return row fi; T := procname(n-1);
    for k from 1 to n-1 do row[k] := T[k] + T[k-1] + row[k-1] od; row end:
    T := (n, k) -> A336858row(n)[k]:
    seq(print(seq(T(n, k), k=0..n)), n=0..8); # Peter Luschny, Aug 06 2020
  • Mathematica
    T[, 0] = 1; T[n, n_] = 1;
    T[n_, k_] := T[n, k] = T[n, k-1] + T[n-1, k] + T[n-1, k-1];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 29 2023 *)

Formula

T(n,k) = T(n, k-1) + T(n-1, k) + T(n-1, k-1) for 1 <= k <= n-1 with T(n,0) = 1 = T(n,n) for n >= 0.
T(n,k) = D(n,k) - Sum_{m=1..k} b(m-1)*D(n-m, k-m) - Sum_{m=0..k-1} D(n-m, k-m-1), where D(n,k) = A008288(n,k) (square array of Delannoy numbers) and b(n) = A086616(n).
T(n,1) = A005408(n-1) = 2*n - 1 for n >= 1.
T(n,2) = A059993(n-2) = 2*n^2 - 2*n - 3 for n >= 2.
T(n,n-1) = A086616(n-1) for n >= 1.
T(n,n-2) = A035011(n-1) = A006318(n-1) - 1 for n >= 2.
Sum_{k=0..n} T(n,k) = A104858(n) for n >= 0.
Bivariate o.g.f.: (1 - y - x*y*(1 + g(x*y)))/((1 - x*y)*(1 - x - y - x*y)), where g(w) = 2/(1 - w + sqrt(1 - 6*w + w^2)) = o.g.f. of A006318 (large Schroeder numbers).
Bivariate o.g.f.: (1 - y - 2*x*y*q(x*y))/((1 - x*y)*(1 - x - y - x*y)), where q(w) = 2/(1 + w + sqrt(1 - 6*w + w^2)) = o.g.f. of A001003 (little Schroeder numbers).
T(2*n,n) = A333090(n). - Peter Luschny, Aug 06 2020

A374584 Numbers k such that 7*k + 2 is a square.

Original entry on oeis.org

1, 2, 14, 17, 41, 46, 82, 89, 137, 146, 206, 217, 289, 302, 386, 401, 497, 514, 622, 641, 761, 782, 914, 937, 1081, 1106, 1262, 1289, 1457, 1486, 1666, 1697, 1889, 1922, 2126, 2161, 2377, 2414, 2642, 2681, 2921, 2962, 3214, 3257, 3521, 3566, 3842, 3889
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 12 2024

Keywords

Crossrefs

The numbers k such that (m + (9-m)*k) is a square: A000217 (m = 1), this sequence (m = 2), A003154 (m = 3), A195162 (m = 4), A028387 (m = 5), A100536 (m = 6), A059993 (m = 7), A028884 (m = 8).
Cf. A047341.

Programs

  • Magma
    [k: k in [0..4000] | IsSquare(7*k + 2)];
  • Mathematica
    ((Table[7*n + {3, 4}, {n, 0, 23}] // Flatten)^2 - 2)/7 (* Amiram Eldar, Aug 12 2024 *)

Formula

a(n) = (A047341(n)^2 - 2)/7. - Amiram Eldar, Aug 12 2024
Previous Showing 11-20 of 20 results.