login
This site is supported by donations 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). 6
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 (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

Table of n, a(n) for n=1..45.

Samuel Minter, Abulsme function information and definition

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)

PROG

(C program) 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: A255716 A177954 A077053 * A060438 A106190 A029290

Adjacent sequences:  A105269 A105270 A105271 * A105273 A105274 A105275

KEYWORD

nonn,more,tabl

AUTHOR

N. J. A. Sloane, Aug 10 2008, based on email from Samuel Minter (abulsme(AT)abulsme.com0, May 08 2008

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified September 12 09:33 EDT 2015. Contains 261559 sequences.