A066182 Permutation of the integers with cycle form {1}, {3, 2}, {6, 5, 4}, {10, 9, 8, 7}, ...
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
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 ]
Links
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
Comments