login
A374531
a(n) = A374494(A374494(n)).
5
1, 2, 3, 5, 9, 6, 7, 8, 4, 10, 14, 20, 12, 18, 15, 16, 17, 11, 19, 13, 21, 27, 35, 25, 33, 23, 31, 28, 29, 30, 22, 32, 24, 34, 26, 36, 44, 54, 42, 52, 40, 50, 38, 48, 45, 46, 47, 37, 49, 39, 51, 41, 53, 43, 55
OFFSET
1,2
COMMENTS
Triangle read by rows where row n is a block of length 4*n-1 which is a permutation of the numbers of its constituents.
Generalization of the Cantor numbering method for two adjacent diagonals. A pair of neighboring diagonals are combined into one block.
The sequence is an intra-block permutation of positive integers.
The sequence A373498 generates the cyclic group C6 under composition. The elements of C6 are the successive compositions of A373498 with itself: A374494 = A373498(A373498) = A373498^2, A370655 = A373498^3, A374531 = A373498^4, A374447 = A373498^5. The identity element is A000027 = A373498^6. - Boris Putievskiy, Aug 02 2024
FORMULA
Linear sequence:
a(n) = P(n) + (L(n)-1)*(2*L(n)-1), where L(n) = ceiling((sqrt(8*n+1)-1)/4),
L(n) = A204164(n), R(n) = n - (L(n)-1)*(2*L(n)-1), P(n) = 2*L(n) - R(n) - 1, if R(n) < 2*L(n) - 1 and R(n) mod 2 = 1, P(n) = 4*L(n) - R(n), if R(n) < 2*L(n) - 1 and R(n) mod 2 = 0, P(n) = R(n), if R(n) = 2*L(n), P(n) = R(n), if R(n) >= 2*L(n) - 1 and R(n) mod 2 = 1, P(n) = - 2*L(n) + R(n) - 1, if R(n) >= 2*L(n) - 1 and R(n) mod 2 = 0.
a(n) = A373498(A373498(A373498(A373498(n)))). Boris Putievskiy, Aug 02 2024
Triangular array T(n,k) for 1 <= k <= 4*n-1 (see Example):
T(n,k) = (n-1)*(2*n-1) + P(n,k), where P(n,k) = 2n - k - 1, if k < 2*n-1 and k mod 2 = 1, P(n,k) = 4n - k, if k < 2*n-1 and k mod 2 = 0, P(n,k) = k, if k = 2*n, P(n,k) = k, if k >= 2*n and k mod 2 = 1, P(n,k) = - 2n + k - 1, if k >= 2*n and k mod 2 = 0.
EXAMPLE
Triangle begins:
k = 1 2 3 4 5 6 7 8 9 10 11
n=1: 1, 2, 3;
n=2: 5, 9, 6, 7, 8, 4, 10;
n=3: 14, 20, 12, 18, 15, 16, 17, 11, 19, 13, 21;
The triangle's rows can be arranged as two successive upward antidiagonals in an array:
1, 3, 6, 10, 15, 21, ...
2, 9, 4, 18, 13, 31, ...
5, 8, 12, 19, 23, 34, ...
7, 20, 11, 33, 24, 50, ...
14, 17, 25, 32, 40, 51, ...
16, 35, 22, 52, 39, 73, ...
Subtracting (n-1)*(2*n-1) from each term in row n is a permutation of 1 .. 4*n-1:
1,2,3,
2,6,3,4,5,1,7
4,10,2,8,5,6,7,1,9,3,11
...
The 4th power of each permutation in example A373498 is equal to the corresponding permutation above:
(2,1,3)^4 = (1,2,3),
(2,6,4,3,5,1,7)^4 = (2,6,3,4,5,1,7),
(2,8,4,10,6,5,7,3,9,1,11)^4 = (4,10,2,8,5,6,7,1,9,3,11).
MATHEMATICA
Nmax=21;
a[n_]:=Module[{L, R, P, Result}, L=Ceiling[(Sqrt[8*n+1]-1)/4];
R=n-(L-1)*(2*L-1);
P=Which[R<=2*L-1&&Mod[R, 2]==1, R+1, R<=2*L-1&&Mod[R, 2]==0, R+2*L, R>2*L-1&&Mod[R, 2]==1, R, R>2*L-1&&Mod[R, 2]==0, 4*L-1-R];
Result=P+(L-1)*(2*L-1);
Result]
Table[a[n], {n, 1, Nmax}] (* A373498(n) *)
Table[a[a[a[a[n]]]], {n, 1, Nmax}] (* this sequence *)
Nmax=21;
a[n_]:=Module[{L, R, P, Result}, L=Ceiling[(Sqrt[8*n+1]-1)/4];
R=n-(L-1)*(2*L-1);
P=Which[R<2*L-1&&Mod[R, 2]==1, 2*L-R-1, R<2*L-1&&Mod[R, 2]==0, 4*L-R, R==2*L, R, R>=2*L-1&&Mod[R, 2]==1, R, R>=2*L-1&&Mod[R, 2]==0, -2*L+R-1];
Result=P+(L-1)*(2*L-1);
Result];
Table[a[n], {n, 1, Nmax}]
CROSSREFS
Sequence in context: A021093 A342444 A011026 * A069805 A123923 A045965
KEYWORD
nonn,tabf
AUTHOR
Boris Putievskiy, Jul 10 2024.
STATUS
approved