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.

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

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 10, 7, 8, 9, 15, 11, 12, 13, 14, 21, 16, 17, 18, 19, 20, 28, 22, 23, 24, 25, 26, 27, 36, 29, 30, 31, 32, 33, 34, 35, 45, 37, 38, 39, 40, 41, 42, 43, 44, 55, 46, 47, 48, 49, 50, 51, 52, 53, 54, 66, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 78, 67, 68, 69, 70, 71
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 step right. - Antti Karttunen, May 07 2002
As a rectangular array, a(n) is the natural interspersion of the sequence of triangular numbers; see A192872. [Clark Kimberling, Aug 12 2011]

Examples

			Northwest corner, when sequence is formatted as the natural interspersion of the sequence (1,3,6,10,15,...) of triangular numbers:
  1...3...6...10...15
  2...4...7...11...16
  5...8...12..17...23
  9...13..18..24...31     [ _Clark Kimberling_, Aug 12 2011 ]
		

Crossrefs

Inverse permutation: A066181.

Programs

  • Mathematica
    FromCycles[Table[n(n-1)/2+Range[n, 1, -1], {n, 13}]]
  • Python
    from math import isqrt, comb
    def A066182(n): return -1+n+comb(isqrt(n<<3)+3>>1,2)-comb(isqrt(n-1<<3)+3>>1,2) # Chai Wah Wu, Jun 09 2025

Formula

a(n) = -1+n+binomial(A002024(n)+1,2)-binomial(A002024(n-1)+1,2) where A002024(n) is round(sqrt(2*n)). - Brian Tenneson, Feb 03 2017