

A101387


Quet transform of A002260.


2



1, 1, 2, 1, 3, 1, 5, 1, 1, 7, 1, 2, 1, 9, 1, 3, 1, 12, 1, 1, 4, 1, 15, 1, 2, 1, 5, 1, 18, 1, 3, 1, 7, 1, 1, 21, 1, 4, 1, 9, 1, 2, 1, 24, 1, 5, 1, 11, 1, 3, 1, 28, 1, 1, 6, 1, 13, 1, 4, 1, 32, 1, 2, 1, 7, 1, 15, 1, 5, 1, 36, 1, 3, 1, 9, 1, 1, 17, 1, 6, 1, 40, 1, 4, 1, 11, 1, 2, 1, 19, 1, 7, 1, 44, 1, 5, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

The Quet transform converts any sequence of positive integers containing an infinite number of 1's into another sequence of positive integers containing an infinite number of 1's.
Start with a sequence, {a(k)}, of only positive integers and an infinite number of 1's. Example: 1,1,2,1,2,3,1,2,3,4,1,... (A002260).
Form the sequence {b(k)} (which is a permutation of the positive integers), given by b(k) = the a(k)th smallest positive integer not yet in the sequence b, with b(1)=a(1).
In the example b is 1,2,4,3,6,8,5,9,11,13,7,12,15,... (A065562).
Let {c(k)} be the inverse of {b(k)}. In the example c = 1,2,4,3,7,5,11,6,8,16,9,12... (A065579).
Form the final sequence {d(k)}, where each d(k) is such that c(k) = the d(k)th smallest positive integer not yet in the sequence c, with d(1)=c(1).
In the example d is 1,1,2,1,3,1,5,1,1,7,1,2,1,9,1,3,1,12,1,1,4,1,15,... (the current sequence).
A more formal description of the Quet transform is as follows.
Let N denote the positive integers. For any permutation p: N > N, let T(p): N > N be given by T(p)(n) = # of elements in {m in N  m >= n AND p(m) <= p(n)}. Observe that T is a bijection from the set of permutations N > N onto the set of sequences N > N that contain infinitely many 1's.
Now suppose f: N > N contains infinitely many 1's; then its Quet transform Q(f): N > N is T^(1)[(T(f))^(1)], which also contains infinitely many 1's. Q is selfinverse; f and Q(f) correspond via T to a permutation and its inverse.


LINKS

Table of n, a(n) for n=1..97.
David Wasserman, Quet transform + PARI code [Cached copy]


PROG

(PARI code from David Wasserman, Jan 14 2005)
\\ PARI code to compute the Quet transform. Put the first n terms of the sequence
\\ into a vector v; then Q(v) returns the transformed sequence. The output is a
\\ vector, containing as many terms as can be computed from the given data.
TInverse(v) = local(l, w, used, start, x); l = length(v); w = vector(l); used = vector(l); start = 1; for (i = 1, l, while (start <= l && used[start], start++); x = start; for (j = 2, v[i], x++; while (x <= l && used[x], x++)); if (x > l, return (vector(i  1, k, w[k])), w[i] = x; used[x] = 1)); w;
PInverse(v) = local(l, w); l = length(v); w = vector(l); for (i = 1, l, if (v[i] <= l, w[v[i]] = i)); w;
T(v) = local(l, w, c); l = length(v); w = vector(l); for (n = 1, l, if (v[n], c = 0; for (m = 1, n  1, if (v[m] < v[n], c++)); w[n] = v[n]  c, return (vector(n  1, i, w[i])))); w;
Q(v) = T(PInverse(TInverse(v)));


CROSSREFS

Cf. A002260, A100661.
Sequence in context: A069230 A242180 A163961 * A117365 A116212 A079068
Adjacent sequences: A101384 A101385 A101386 * A101388 A101389 A101390


KEYWORD

easy,nonn


AUTHOR

David Wasserman, Jan 14 2005


STATUS

approved



