A064789 Inverse permutation to A057028.
1, 3, 2, 6, 4, 5, 10, 8, 7, 9, 15, 13, 11, 12, 14, 21, 19, 17, 16, 18, 20, 28, 26, 24, 22, 23, 25, 27, 36, 34, 32, 30, 29, 31, 33, 35, 45, 43, 41, 39, 37, 38, 40, 42, 44, 55, 53, 51, 49, 47, 46, 48, 50, 52, 54, 66, 64, 62, 60, 58, 56, 57, 59, 61, 63, 65, 78, 76, 74, 72, 70, 68
Offset: 1
Examples
If viewed as a regular triangle: 1; 3, 2; 6, 4, 5; 10, 8, 7, 9; 15, 13, 11, 12, 14; 21, 19, 17, 16, 18, 20; 28, 26, 24, 22, 23, 25, 27; 36, 34, 32, 30, 29, 31, 33, 35; 45, 43, 41, 39, 37, 38, 40, 42, 44; 55, 53, 51, 49, 47, 46, 48, 50, 52, 54; 66, 64, 62, 60, 58, 56, 57, 59, 61, 63, 65; 78, 76, 74, 72, 70, 68...
Links
- Gerhard Ramsebner, As index of Zernike polynomials (animated SVG).
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
a(n) = my(k=floor((sqrt(8*n)-1)/2)); my(m=2*(n-1)-k*(k+2)); k*(k+1)/2+abs(m)+(m<=0); for(n=1, 32, print(n ", ", a(n))) \\ Gerhard Ramsebner, Nov 10 2024
Formula
a(n) = k*(k+1)/2 + abs(m) + [m<=0] where k=floor((sqrt(8*n)-1)/2), m=2*(n-1)-k*(k+2) and [] is the Iverson bracket. - Gerhard Ramsebner, Nov 10 2024
Extensions
More terms from David Wasserman, Aug 14 2002