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 31-35 of 35 results.

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

A236376 Riordan array ((1-x+x^2)/(1-x)^2, x/(1-x)^2).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 3, 7, 5, 1, 4, 14, 16, 7, 1, 5, 25, 41, 29, 9, 1, 6, 41, 91, 92, 46, 11, 1, 7, 63, 182, 246, 175, 67, 13, 1, 8, 92, 336, 582, 550, 298, 92, 15, 1, 9, 129, 582, 1254, 1507, 1079, 469, 121, 17, 1, 10, 175, 957, 2508, 3718, 3367, 1925, 696, 154
Offset: 0

Views

Author

Philippe Deléham, Jan 24 2014

Keywords

Comments

Triangle T(n,k), read by rows, given by (1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Row sums are A111282(n+1) = A025169(n-1).
Diagonal sums are A122391(n+1) = A003945(n-1).

Examples

			Triangle begins:
  1;
  1,  1;
  2,  3,   1;
  3,  7,   5,   1;
  4, 14,  16,   7,   1;
  5, 25,  41,  29,   9,  1;
  6, 41,  91,  92,  46, 11,  1;
  7, 63, 182, 246, 175, 67, 13, 1;
		

Crossrefs

Cf. Columns: A028310, A004006.
Cf. Diagonals: A000012, A005408, A130883.
Cf. Similar sequences: A078812, A085478, A111125, A128908, A165253, A207606.
Cf. A321620.

Programs

  • Maple
    # The function RiordanSquare is defined in A321620.
    RiordanSquare(1+x/(1-x)^2, 8); # Peter Luschny, Mar 06 2022
  • Mathematica
    CoefficientList[#, y] & /@
    CoefficientList[
    Series[(1 - x + x^2)/(1 - 2*x - x*y + x^2), {x, 0, 12}], x] (* Wouter Meeussen, Jan 25 2014 *)

Formula

G.f.: (1 - x + x^2)/(1 - 2*x - x*y + x^2).
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k), T(0,0) = T(1,0) = T(1,1) = 1, T(2,0) = 2, T(2,1) = 3, T(2,2) = 1, T(n,k) = 0 if k < 0 or k > n.
The Riordan square (see A321620) of 1 + x/(1 - x)^2. - Peter Luschny, Mar 06 2022

A381534 A084849 interleaved with positive even numbers.

Original entry on oeis.org

1, 2, 4, 4, 11, 6, 22, 8, 37, 10, 56, 12, 79, 14, 106, 16, 137, 18, 172, 20, 211, 22, 254, 24, 301, 26, 352, 28, 407, 30, 466, 32, 529, 34, 596, 36, 667, 38, 742, 40, 821, 42, 904, 44, 991, 46, 1082, 48, 1177, 50, 1276, 52
Offset: 1

Views

Author

Ali Sada, Feb 26 2025

Keywords

Comments

To construct the sequence, we start with two 1’s on separate lines:
1,
1,
Next, we zigzag natural numbers between the lines, leaving spaces:
1,,3,,5,,7,,9,,11,...
1,2,,4,,6,,8,,10,_...
To fill the spaces, we insert the sum of the numbers in the previous column:
1, 2, 3, 7, 5, 16, 7, 29, 9, 46, 11, 67...
1, 2, 4, 4, 11, 6, 22, 8, 37, 10, 56,...
a(n) is the second sequence. The first sequence is A354008(k), for k > 2.
The first sequence is odd numbers interleaved with A130883. (From M. F. Hasler via Seqfan.)
The numbers we find by adding the columns are: 2,4,7,11,16,22,29,37,46,56,67,…. which is A000124 (n >= 1). The sequence is constructed by alternating the even indexed terms of this sequence (1,4,11,22,37,56…) with the numbers (added by “zigzag” to the second row before we add the columns to get the missing numbers); namely the even numbers 2*n (n >= 1). Therefore, the sequence seems to be A000124(2n) (n>=0), interleaved with A005843(n); (n>=1). (From David James Sycamore via Seqfan.)

Examples

			A084849(0) = 1, so a(1) = 1.
a(2) is the first positive even number, 2.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,3,0,-3,0,1},{1,2,4,4,11,6},60] (* Harvey P. Dale, May 09 2025 *)

Formula

G.f.: -x*(-2*x^4+2*x^3-x^2-2*x-1)/(-x^6+3*x^4-3*x^2+1). - Michel Marcus Feb 27 2025

A386481 Array read by upward antidiagonals: T(k,n) = 1 (k = 0, n >= 0), T(k,n) = binomial(n,2)*k^2 + n*(k-1) + 1 (k >= 1, n >= 0).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 7, 4, 1, 1, 4, 14, 16, 7, 1, 1, 5, 23, 34, 29, 11, 1, 1, 6, 34, 58, 63, 46, 16, 1, 1, 7, 47, 88, 109, 101, 67, 22, 1, 1, 8, 62, 124, 167, 176, 148, 92, 29, 1, 1, 9, 79, 166, 237, 271, 259, 204, 121, 37, 1, 1, 10, 98, 214, 319, 386, 400, 358, 269, 154, 46, 1, 1, 11, 119, 268, 413, 521, 571, 554, 473, 343, 191, 56, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 11 2025

Keywords

Comments

T(k,n) is the maximum number of regions the plane can be divided into by drawing n k-armed long-legged V's.

Examples

			Array begins (the rows are T(0,n>=0),, T(1,n>=0), T(2,n>=0), ...):
   1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   1, 1, 2, 4, 7, 11, 16, 22, 29, ...
   1, 2, 7, 16, 29, 46, 67, 92, 121, ...
   1, 3, 14, 34, 63, 101, 148, 204, 269, ...
   1, 4, 23, 58, 109, 176, 259, 358, 473, ...
   1, 5, 34, 88, 167, 271, 400, 554, 733, ...
   1, 6, 47, 124, 237, 386, 571, 792, 1049, ...
   1, 7, 62, 166, 319, 521, 772, 1072, 1421, ...
    ...
The first few antidiagonals are:
    1,
    1, 1,
    1, 1, 1,
    1, 2, 2, 1,
    1, 3, 7, 4, 1,
    1, 4, 14, 16, 7, 1,
    1, 5, 23, 34, 29, 11, 1,
    1, 6, 34, 58, 63, 46, 16, 1,
    1, 7, 47, 88, 109, 101, 67, 22, 1,
     ...
		

References

  • David O. H. Cutler and Neil J. A. Sloane, Cutting a pancake with an exotic knife, Paper in preparation, Sep 05 2025

Crossrefs

This is a companion to the array A386478.
The rows and columns include A000124, A130883, A140064, A383464, and A008865.
Previous Showing 31-35 of 35 results.