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.

A065167 Table T(n,k) read by antidiagonals, where the k-th row gives the permutation t->t+k of Z, folded to N (k >= 0, n >= 1).

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 1, 6, 6, 5, 6, 2, 8, 8, 6, 3, 8, 4, 10, 10, 7, 8, 1, 10, 6, 12, 12, 8, 5, 10, 2, 12, 8, 14, 14, 9, 10, 3, 12, 4, 14, 10, 16, 16, 10, 7, 12, 1, 14, 6, 16, 12, 18, 18, 11, 12, 5, 14, 2, 16, 8, 18, 14, 20, 20, 12, 9, 14, 3, 16, 4, 18, 10, 20, 16, 22, 22, 13, 14, 7, 16, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 19 2001

Keywords

Comments

Simple periodic site swap permutations of natural numbers.
Row n of the table (starting from n=0) gives a permutation of natural numbers corresponding to the simple, infinite, periodic site swap pattern ...nnnnn...

Examples

			Table begins:
1 2 3 4 5 6 7 ...
2 4 1 6 3 8 5 ...
4 6 2 8 1 10 3 ...
6 8 4 10 2 12 1 ...
		

Crossrefs

Successive rows and associated site swap sequences, starting from the zeroth row: (A000027, A000004), (A065164, A000012), (A065165, A007395), (A065166, A010701). Cf. also A065171, A065174, A065177. trinv given at A054425.

Programs

  • Maple
    PerSS_table := (n) -> PerSS((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1, (n-((trinv(n)*(trinv(n)-1))/2))); PerSS := (n,c) -> Z2N(N2Z(n)+c);
    N2Z := n -> ((-1)^n)*floor(n/2); Z2N := z -> 2*abs(z)+`if`((z < 1),1,0);
    [seq(PerSS_table(j),j=0..119)];

Formula

Let f: Z -> N be given by f(z) = 2z if z>0 else 2|z|+1, with inverse g(z) = z/2 if z even else (1-z)/2. Then the n-th term of the k-th row is f(g(n)+k).