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.

User: Ramasamy Chandramouli

Ramasamy Chandramouli's wiki page.

Ramasamy Chandramouli has authored 2 sequences.

A141110 Number of cycles and fixed points in the permutation (n, n-2, n-4, ..., 1, ..., n-3, n-1).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 3, 1, 2, 3, 1, 3, 4, 3, 1, 3, 2, 3, 5, 1, 2, 5, 1, 3, 4, 1, 1, 7, 6, 1, 3, 1, 4, 5, 3, 1, 4, 1, 7, 3, 4, 5, 7, 3, 2, 7, 1, 1, 8, 1, 3, 3, 4, 3, 7, 5, 2, 5, 3, 9, 10, 1, 5, 7, 2, 1, 3, 3, 6, 5, 1, 5, 8, 7, 3, 3, 4, 1, 9, 1, 2, 11
Offset: 1

Author

Ramasamy Chandramouli, Jun 05 2008

Keywords

Comments

The above permutation (see A130517) can be generated by taking S_n: (1, 2, ..., n) and reversing the first two, first three and so on till first n, elements in sequence. Interestingly this permutation orbit has length given by A003558.

Examples

			a(20) = 2, since (20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19) has two cycles (1, 20, 19, 17, 13, 5, 12, 3, 16, 11) and (2, 18, 15, 9, 4, 14, 7, 8, 6, 10).
		

Crossrefs

Cf. A130517 (permutations), A003558 (order).

Programs

  • Python
    from sympy.combinatorics import Permutation
    def a(n):
        p = list(range(n, 0, -2)) + list(range(1+(n%2), n, 2))
        return Permutation([pi-1 for pi in p]).cycles
    print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Dec 27 2021

A130320 Given n numbers n>(n-1)>(n-2)>...>2>1, adding the first and last numbers leads to the identity n+1 = (n-1)+2 = (n-2)+3 = ... In case if some positive x_1, x_2, ... are added to n, (n-1) etc, the strict inequality could be retained. This could be repeated finitely many times till it ends in inequality of form M > N where M-N is minimal. This sequence gives the value of M for different n.

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 18, 22, 34, 40, 56, 64, 66, 74, 78, 86, 130, 142, 148, 160, 216, 232, 240, 256, 258, 274, 282, 298, 302, 318, 326, 342, 514, 538, 550, 574, 580, 604, 616, 640, 856, 888, 904, 936, 944, 976, 992, 1024, 1026, 1058, 1074, 1106, 1114, 1146, 1162, 1194, 1198
Offset: 1

Author

Ramasamy Chandramouli, May 23 2007

Keywords

Comments

Apparently contains 2^(2k+1) and 2^k+2. - Ralf Stephan, Nov 10 2013

Examples

			a(5) = 10 because we have 5 > 4 > 3 > 2 > 1.
To follow a strict inequality we would have 5 + x > 4 + y > 3 > 2 > 1, where x >= 0, y >= 0.
The next level of inequality gives 1 + 5 + x > 2 + 4 + y > 3. This implies x > y.
Continuing with next level gives 3 + 6 + x > 6 + y. This gives x = 1, y = 0.
Hence 10 > 6 giving a(5) = 10.
		

Formula

For n of form 2^k, we have a(n) = 4a(n-1) - 2 with a(1) = 2. For n of form 2^k + 2^(k-1), a(n) = 4a(n-1) with a(1) = 4.