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.

A066181 Permutation of the integers with cycle form {1}, {2, 3}, {4, 5, 6}, {7, 8, 9, 10}, ...

Original entry on oeis.org

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

Views

Author

Wouter Meeussen, Dec 15 2001

Keywords

Comments

Arrange natural numbers 1,2,3,4,5,... as a triangle like A000027, then rotate each row of triangle one left. - Antti Karttunen, May 07 2002
For a group of n terms a^(n)(k)= k where n(n-1)/2 < k <= n(n+1)/2. E.g. for the three terms 5, 6 and 4, a(5)= 6, a(6) = 4, a(4) = 5; a(a(a(5))) = 5 = a^(3)(5). - Amarnath Murthy, May 31 2003

Crossrefs

Inverse permutation: A066182.

Programs

  • Maple
    a := proc(n) floor(sqrt(2*n));n+1;`if`(2*n=%%*(%%+1),%-%%,%) end: # Peter Luschny, Jan 25 2017
  • Mathematica
    FromCycles[Table[n(n-1)/2+Range[n], {n, 13}]]

Formula

a(n) = 1 + n + binomial(round(sqrt(2*n)),2) - binomial(round(sqrt(2*n+2)),2). - Brian Tenneson, Jan 23 2017