login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105272 Array T(n,k) (k >= 1, n >= k) read by antidiagonals (see definition in Comments lines). 8
1, 1, 2, 1, 2, 2, 1, 4, 2, 2, 1, 4, 4, 2, 2, 1, 3, 6, 4, 2, 2, 1, 3, 6, 7, 4, 2, 2, 1, 6, 4, 3, 7, 4, 2, 2, 1, 6, 4, 3, 15, 14, 4, 2, 2, 1, 10, 4, 8, 5, 6, 14, 4, 2, 2, 1, 10, 21, 10, 5, 10, 6, 14, 4, 2, 2, 1, 12, 3, 6, 12, 12, 12, 6, 14, 4, 2, 2 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
T(n,k) is the order of the permutation p of [1,...,n] defined as follows:
Write F={1,2,3,....,n}.
Place F into a "window" of width k, where k <= n. That is, write out the elements from left to right, up to down, with k elements per line.
Produce a new set F' by traversing the set according to the following algorithm, adding elements to F' as they are traversed in F.
Traversal algorithm:
1) Start at the upper right hand element.
2) If there is an element below the current one
then
A) go to it
B) go back to step 2
3) Otherwise, if there is a column to the left of the current one, then
A) go to it
B) go back to step 2
4) End
Then p is the permutation that sends F to F'.
LINKS
EXAMPLE
To find T(12,5):
Start with F = { A B C D E F G H I J K L } with a window of widhth 5:
A B C D E
F G H I J
K L
Now let's traverse that and construct our new set
Upper right is E so add it to our new set:
{ E ....
We can go down so we do so and get J
{ E J .....
Now we can't go down so go to the top of the column to the left and get D
{ E J D .....
Eventually we will get:
F' = { E J D I C H B G L A F K }
The permutation p that sends F to F' is a single cycle of length 12, so T(12,5) = 12.
Array begins:
k = 1: 1,1,1,1,1,1,1,1,1,1,... (A000012)
k = 2: 2,2,4,4,3,3,6,6,10,10,... (A024222)
k = 3: 2,2,4,6,6,4,4,4,21,3,... (A118960)
k = 4: 2,2,4,7,3,3,8,10,6,6,... (A120280)
k = 5: 2,2,4,7,15,5,5,12,40,45,... (A120363)
k = 6: 2,2,4,14,6,10,12,12,7,15,... (A120654)
k = 7: 2,2,4,14,6,12,30,4,4,20,... (A121514)
k = 8: 2,2,4,14,6,13,13,24,8,8,...
k = 9: 2,2,4,14,6,13,15,15,63,9,...
k = 10: 2,2,4,14,6,13,16,10,18,12,...
... (Rows converge to A121526)
MATHEMATICA
T[1] = ConstantArray[1, 75];
For[k = 2, k <= 20, k++,
T[k] = Table[f = Range[n]; fp = {};
For[col = k, col > 0, col--,
For[row = 0, col + row*k <= n, row++,
AppendTo[fp, f[[col + row*k]]]]];
LCM @@ Length /@ First[FindPermutation[f, fp]], {n, k, 75}]];
A105272 = {};
For[i = 1, i <= 20, i++,
For[j = i, j >= 1, j--,
AppendTo[A105272, T[i - j + 1][[j]]]]];
A105272 (* Robert Price, Aug 26 2019 *)
PROG
(C)
int abulsme(int l, int s)
{
long int t[30000], m[30000], c[30000], b[30000];
long int k, i, n, j, z, u, q, g;
for (t[1] = s, k = 2; k <= l; k++)
{
m[k] = (t[k - 1] + s - l + abs(t[k - 1] + s - l)) / (2 * abs(t[k - 1] + s - l - 1) + 2);
t[k] = ((t[k - 1] - m[k]) % (s * m[k] + 2 * l * abs(m[k] - 1))) + s * abs(m[k] - 1);
}
for (i = 1; i <= l; b[i] = 0, i++)
;
for (n = 0, i = 1; i <= l; i++)
{
if (!b[i])
{
j = i;
k = 0;
do
{
j = t[j];
b[j] = 1;
k++;
} while (j != i);
u = 1;
z = 1;
if (i > 1)
{
do
{
if (c[z] == k)
{
u = 0;
}
z++;
} while (!((z > n) || (!u)));
}
if (u)
{
n++;
c[n] = k;
}
}
for (q = c[1], g = q, z = 1; z < n; z++, g = q)
{
for (0; q % c[z + 1]; q += g)
;
}
}
return g;
}
CROSSREFS
Sequence in context: A363345 A344651 A308558 * A060438 A106190 A029290
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Aug 10 2008, based on email from Samuel Minter (abulsme(AT)abulsme.com0, May 08 2008
EXTENSIONS
a(46)-a(78) from Robert Price, Aug 26 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)