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.

A109857 Next 2*n - 1 odd numbers in decreasing order followed by next 2*n even numbers in decreasing order.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Jul 08 2005

Keywords

Comments

This sequence is a permutation of the positive integers. - Werner Schulte, Jul 29 2023

Examples

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

Crossrefs

Cf. A074147 (row reversed), A074149 (row sums), A074148 (column 1), A001844, A061925 (main diagonal).

Programs

  • PARI
    T(n,k)=n*(n+1)/2+floor(n/2)-2*(k-1) \\ Werner Schulte, Jul 29 2023

Formula

From Werner Schulte, Jul 29 2023: (Start)
T(n, k) = n*(n+1)/2 + floor(n/2) - 2*(k-1) for 1 <= k <= n.
T(n, n) = (n^2-3*n+4)/2 + floor(n/2) for n > 0.
T(2*n-1, n) = n^2 + (n-1)^2 = A001844(n-1) for n > 0. (End)

Extensions

More terms from Joshua Zucker, May 05 2006