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-10 of 17 results. Next

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

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 07 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(1,2), T(2,1), T(2,2), T(3,1);
...
T(1,n), T(1,n-1), T(2,n-2), T(2,n-1), T(3,n-2), T(3,n-3)...T(n,1);
...
Descent by snake along two adjacent antidiagonal - step to the west, step to the southwest, step to the east, step to the southwest and so on. The length of each step is 1.
Table contains:
row 1 is alternation of elements A130883 and A033816,
row 2 accommodates elements A100037 in odd places;
column 1 is alternation of elements A000384 and A091823,
column 2 is alternation of elements A071355 and A014106,
column 3 accommodates elements A130861 in even places;
main diagonal accommodates elements A188135 in odd places,
diagonal 1, located above the main diagonal, is alternation of elements A033567 and A033566,
diagonal 2, located above the main diagonal, is alternation of elements A139271 and A033585.

Examples

			The start of the sequence as a table:
   1,  3,  2,   8,   7,  17,  16,  30,  29,  47,  46, ...
   4,  5,  9,  10,  18,  19,  31,  32,  48,  49,  69, ...
   6, 12, 11,  21,  20,  34,  33,  51,  50,  72,  71, ...
  13, 14, 22,  23,  35,  36,  52,  53,  73,  74,  98, ...
  15, 25, 24,  38,  37,  55,  54,  76,  75, 101, 100, ...
  26, 27, 39,  40,  56,  57,  77,  78, 102, 103, 131, ...
  28, 42, 41,  59,  58,  80,  79, 105, 104, 134, 133, ...
  43, 44, 60,  61,  81,  82, 106, 107, 135, 136, 168, ...
  45, 63, 62,  84,  83, 109, 108, 138, 137, 171, 170, ...
  64, 65, 85,  86, 110, 111, 139, 140, 172, 173, 209, ...
  66, 88, 87, 113, 112, 142, 141, 175, 174, 212, 211, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   3,  4;
   2,  5,  6;
   8,  9, 12, 13;
   7, 10, 11, 14, 15;
  17, 18, 21, 22, 25, 26;
  16, 19, 20, 23, 24, 27, 28;
  30, 31, 34, 35, 38, 39, 42, 43;
  29, 32, 33, 36, 37, 40, 41, 44, 45;
  47, 48, 51, 52, 55, 56, 59, 60, 63, 64;
  46, 49, 50, 53, 54, 57, 58, 61, 62, 65, 66;
  ...
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 number 2*r-2 of the triangular array above.
Last  2*r-1 numbers are from row number 2*r-1 of the triangular array above.
   1;
   3,  4,  2,  5,  6;
   8,  9, 12, 13,  7, 10, 11, 14, 15;
  17, 18, 21, 22, 25, 26, 16, 19, 20, 23, 24, 27, 28;
  30, 31, 34, 35, 38, 39, 42, 43, 29, 32, 33, 36, 37, 40, 41, 44, 45;
  47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 46, 49, 50, 53, 54, 57, 58, 61, 62, 65, 66;
  ...
Row number r contains permutation 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-r-4, 2*r*r-r-1, 2*r*r-r.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := ((k+n)^2 - 4k + 3 + (-1)^k - (k+n-2)(-1)^(k+n))/2;
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 29 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=((t+2)**2-4*j+3+(-1)**j-t*(-1)**(t+2))/2

Formula

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

A139579 a(n) = 2*n^2 + 15*n.

Original entry on oeis.org

0, 17, 38, 63, 92, 125, 162, 203, 248, 297, 350, 407, 468, 533, 602, 675, 752, 833, 918, 1007, 1100, 1197, 1298, 1403, 1512, 1625, 1742, 1863, 1988, 2117, 2250, 2387, 2528, 2673, 2822, 2975, 3132, 3293, 3458, 3627, 3800, 3977, 4158, 4343, 4532, 4725, 4922, 5123, 5328, 5537
Offset: 0

Views

Author

Omar E. Pol, May 19 2008

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-1) + 4*n + 13; a(0) = 0. - Vincenzo Librandi, Nov 24 2010
From Stefano Spezia, Oct 21 2023: (Start)
O.g.f.: x*(17 - 13*x)/(1 - x)^3.
E.g.f.: exp(x)*x*(17 + 2*x). (End)
From Amiram Eldar, Nov 10 2023: (Start)
Sum_{n>=1} 1/a(n) = 182144/675675 - 2*log(2)/15.
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/15 - Pi/30 + 67952/675675. (End)

A139576 a(n) = n*(2*n + 9).

Original entry on oeis.org

0, 11, 26, 45, 68, 95, 126, 161, 200, 243, 290, 341, 396, 455, 518, 585, 656, 731, 810, 893, 980, 1071, 1166, 1265, 1368, 1475, 1586, 1701, 1820, 1943, 2070, 2201, 2336, 2475, 2618, 2765, 2916, 3071, 3230, 3393, 3560, 3731, 3906
Offset: 0

Views

Author

Omar E. Pol, May 19 2008

Keywords

Crossrefs

Programs

Formula

a(n) = 2*n^2 + 9*n.
a(n) = a(n-1) + 4*n + 7 (with a(0)=0). - Vincenzo Librandi, Nov 24 2010
From Elmo R. Oliveira, Nov 29 2024: (Start)
G.f.: x*(11 - 7*x)/(1-x)^3.
E.g.f.: exp(x)*x*(11 + 2*x).
a(n) = A277979(n)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A139577 a(n) = n*(2*n + 11).

Original entry on oeis.org

0, 13, 30, 51, 76, 105, 138, 175, 216, 261, 310, 363, 420, 481, 546, 615, 688, 765, 846, 931, 1020, 1113, 1210, 1311, 1416, 1525, 1638, 1755, 1876, 2001, 2130, 2263, 2400, 2541, 2686, 2835, 2988, 3145, 3306, 3471, 3640, 3813, 3990
Offset: 0

Views

Author

Omar E. Pol, May 19 2008

Keywords

Crossrefs

Programs

Formula

a(n) = 2*n^2 + 11*n.
a(n) = a(n-1) + 4*n + 9 (with a(0)=0). - Vincenzo Librandi, Nov 24 2010
From Elmo R. Oliveira, Nov 29 2024: (Start)
G.f.: x*(13 - 9*x)/(1-x)^3.
E.g.f.: exp(x)*x*(13 + 2*x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A139578 a(n) = n*(2*n + 13).

Original entry on oeis.org

0, 15, 34, 57, 84, 115, 150, 189, 232, 279, 330, 385, 444, 507, 574, 645, 720, 799, 882, 969, 1060, 1155, 1254, 1357, 1464, 1575, 1690, 1809, 1932, 2059, 2190, 2325, 2464, 2607, 2754, 2905, 3060, 3219, 3382, 3549, 3720, 3895, 4074, 4257, 4444, 4635, 4830, 5029
Offset: 0

Views

Author

Omar E. Pol, May 19 2008

Keywords

Crossrefs

Programs

Formula

a(n) = 2*n^2 + 13*n.
a(n) = a(n-1) + 4*n + 11 (with a(0)=0). - Vincenzo Librandi, Nov 24 2010
From Elmo R. Oliveira, Nov 29 2024: (Start)
G.f.: x*(15 - 11*x)/(1 - x)^3.
E.g.f.: exp(x)*x*(15 + 2*x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A139580 a(n) = n*(2*n + 17).

Original entry on oeis.org

0, 19, 42, 69, 100, 135, 174, 217, 264, 315, 370, 429, 492, 559, 630, 705, 784, 867, 954, 1045, 1140, 1239, 1342, 1449, 1560, 1675, 1794, 1917, 2044, 2175, 2310, 2449, 2592, 2739, 2890, 3045, 3204, 3367, 3534, 3705, 3880, 4059
Offset: 0

Views

Author

Omar E. Pol, May 19 2008

Keywords

Crossrefs

Programs

Formula

a(n) = 2*n^2 + 17*n.
a(n) = a(n-1) + 4*n + 15; a(0) = 0. - Vincenzo Librandi, Nov 24 2010
From Elmo R. Oliveira, Nov 29 2024: (Start)
G.f.: x*(19 - 15*x)/(1-x)^3.
E.g.f.: exp(x)*x*(19 + 2*x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A139581 a(n) = n*(2*n + 19).

Original entry on oeis.org

0, 21, 46, 75, 108, 145, 186, 231, 280, 333, 390, 451, 516, 585, 658, 735, 816, 901, 990, 1083, 1180, 1281, 1386, 1495, 1608, 1725, 1846, 1971, 2100, 2233, 2370, 2511, 2656, 2805, 2958, 3115, 3276, 3441, 3610, 3783, 3960, 4141
Offset: 0

Views

Author

Omar E. Pol, May 19 2008

Keywords

Crossrefs

Programs

Formula

a(n) = 2*n^2 + 19*n.
a(n) = a(n-1) + 4*n + 17 (with a(0)=0). - Vincenzo Librandi, Nov 24 2010
From Elmo R. Oliveira, Nov 29 2024: (Start)
G.f.: x*(21 - 17*x)/(1-x)^3.
E.g.f.: exp(x)*x*(21 + 2*x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A185878 Accumulation array of A185877, by antidiagonals.

Original entry on oeis.org

1, 4, 2, 11, 10, 3, 24, 28, 18, 4, 45, 60, 51, 28, 5, 76, 110, 108, 80, 40, 6, 119, 182, 195, 168, 115, 54, 7, 176, 280, 318, 300, 240, 156, 70, 8, 249, 408, 483, 484, 425, 324, 203, 88, 9, 340, 570, 696, 728, 680, 570, 420, 256, 108, 10, 451, 770, 963, 1040, 1015, 906, 735, 528, 315, 130, 11, 584, 1012, 1290, 1428, 1440, 1344, 1162, 920, 648, 380, 154, 12
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

A member of the accumulation chain ... < A185879 < A185877 < A185878 < A185880 < ...
See A144112 for the definition of accumulation array.

Examples

			Northwest corner:
  1,  4, 11,  24,  45, ...
  2, 10, 28,  60, 110, ...
  3, 18, 51, 108, 195, ...
  4, 28, 80, 168, 300, ...
  ...
		

Crossrefs

Row 1 to 3: A006527, A006331, A064043.
Column 1 to 5: A000027, A028552, A140677, 12*A000096, 5*A130861.

Programs

  • Mathematica
    f[n_, k_] := k*n*(2*k^2 - 3*k + 3*k*n - 3*n + 7)/6; Table[f[n - k + 1, k], {n,10}, {k, n, 1, -1}] // Flatten (* G. C. Greubel, Jul 21 2017 *)

Formula

T(n,k) = k*n*(2*k^2 -3*k +3*k*n -3*n +7)/6, k>=1, n>=1.

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).

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

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Feb 14 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(1,2), T(2,1), T(3,1);
. . .
T(1,n), T(2,n-1), T(1,n-1), T(2,n-2), T(3,n-2), T(4,n-3)...T(n,1);
...
Descent by snake along two adjacent antidiagonals - step to the southwest, step to the north, step to the southwest, step to the south and so on. The length of each step is 1. Phase four steps is rotated 90 degrees counterclockwise and the mirror of the phase A211377.
Table contains the following:
row 1 is alternation of elements A130883 and A100037,
row 2 accommodates elements A033816 in even places;
column 1 is alternation of elements A000384 and A014106,
column 2 is alternation of elements A091823 and A071355,
column 4 accommodates elements A130861 in odd places;
main diagonal is alternation of elements A188135 and A033567,
diagonal 1, located above the main diagonal, accommodates elements A033585 in even places,
diagonal 2, located above the main diagonal, accommodates elements A139271 in odd places,
diagonal 3, located above the main diagonal, is alternation of elements A033566 and A194431.

Examples

			The start of the sequence as a table:
   1   4   2   9   7   8  16 ...
   5   3  10   8  19  17  32 ...
   6  13  11  22  20  35  33 ...
  14  12  23  21  36  34  53 ...
  15  26  24  39  37  56  54 ...
  27  25  40  38  57  55  78 ...
  28  43  41  60  58  81  79 ...
  ...
The start of the sequence as a triangle array read by rows:
   1
   4  5
   2  3  6
   9 10 13 14
   7  8 11 12 15
  18 19 22 23 26 27
  16 17 20 21 24 25 28
  ...
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  5  2  3  6
   9 10 13 14  7  8 11 12 15
  18 19 22 23 26 27 16 17 20 21 24 25 28
  ...
Row number r contains permutation 4*r-3 numbers from 2*r*r-5*r+4 to 2*r*r-r:
2*r*r-5*r+6, 2*r*r-5*r+7, ..., 2*r*r-r-4, 2*r*r-r-3, 2*r*r-r.
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->((k+n)^2-4*k+3-(-1)^n-(k+n)*(-1)^(k+n))/2: seq(seq(T(k,n-k),k=1..n-1),n=1..13); # Muniru A Asiru, Dec 06 2018
  • Mathematica
    T[n_, k_] := ((n+k)^2 - 4k + 3 - (-1)^n - (-1)^(n+k)(n+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)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-4*j+3-(-1)**i-(t+2)*(-1)**t)/2

Formula

As a table:
T(n,k) = ((k+n)^2-4*k+3-(-1)^n-(k+n)*(-1)^(k+n))/2.
As a linear sequence:
a(n) = (A003057(n)^2-4*A004736(n)+3-(-1)^A002260(n)-A003057(n)*(-1)^A003056(n))/2;
a(n) = ((t+2)^2-4*j+3-(-1)^i-(t+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).
Showing 1-10 of 17 results. Next