

A129676


Permutation sequence generated by the "odious numbers" (A000069), by swapping nth natural number by the (ng)th sequentially, where g=min(odious(n+1)odious(n)1,n1).


4



3, 1, 5, 4, 6, 2, 9, 7, 10, 12, 11, 8, 15, 13, 17, 16, 18, 20, 19, 14, 23, 21, 24, 22, 27, 25, 29, 28, 30, 26, 33, 31, 34, 36, 35, 32, 39, 37, 40, 38, 43, 41, 45, 44, 46, 48, 47, 42, 51, 49, 53, 52, 54, 50, 57, 55, 58, 60, 59, 56, 63, 61, 65, 64, 66, 68, 67, 62, 71, 69, 72, 70
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

In contrast to A128754 and A128756 (which are generated analogously from the primes and the lucky numbers, respectively), this sequence seems consisting solely of fixed points and cycles of length 4,5 and 6. It is also notable that the difference of the number of fixed points and the number of cycles never differs by more than 3, up to index 10000, according to numerical tests. Thus the ratio of the number of fixed points to the number of cycles seems to be asymptotically equal to unity.


LINKS

Ferenc Adorjan, Table of n, a(n) for n = 1..10000
Index entries for sequences that are permutations of the natural numbers


PROG

(PARI) {vperm(z)=local(n, m, q, v, x, j, g);
/* Permutation of positive integers so that starting with the sequence of positive integers, sequentially swap the ith term with max(ig(i), 1)th term, where g(i)=z[i+1]z[i]1. */
j=matsize(z)[2]1; n=jz[j]+z[j6]; v=vector(j); x=vector(n); for(i=1, j, v[i]=i);
for(i=1, j, g=min(z[i+1]z[i]1, i1); q=v[i]; v[i]=v[ig]; v[ig]=q); for(i=1, n, x[i]=v[i]); return(x)}
a=vperm(A000069)


CROSSREFS

Inverse of A129677, Cf. A128754, A128756, A129674, A129675, A129680 and A000069.
Sequence in context: A112620 A325766 A021321 * A154947 A152747 A010847
Adjacent sequences: A129673 A129674 A129675 * A129677 A129678 A129679


KEYWORD

nonn,base


AUTHOR

Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), May 01 2007


STATUS

approved



