

A131987


Representation of a dense parasequence.


12



1, 2, 1, 3, 4, 2, 5, 1, 6, 3, 7, 8, 4, 9, 2, 10, 5, 11, 1, 12, 6, 13, 3, 14, 7, 15, 16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 21, 5, 22, 11, 23, 1, 24, 12, 25, 6, 26, 13, 27, 3, 28, 14, 29, 7, 30, 15, 31, 32, 16, 33, 8, 34, 17, 35, 4, 36, 18, 37, 9, 38, 19, 39, 2, 40, 20, 41, 10, 42, 21, 43
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

A fractal sequence. The parasequence may be regarded as a sort of "limit" of the concatenated segments. The parasequence (itself not a sequence) is dense in the sense that every pair of terms i and j are separated by another term (and hence separated by infinitely many terms).
The parasequence accounts for positions of dyadic rational numbers in the following way: Label 1/2 as 1; label 1/4, 3/4 as 2 and 3; label 1/8, 3/8, 5/8, 7/8 as 4,5,6,7, etc. Then, for example, the ordering 1/8 < 1/4 < 3/8 < 1/2 < 5/8 < 3/4 < 7/8 matches the labels 4,2,5,1,6,3,7, which is the 3rd segment of A131987. The nth segment consists of labels for rationals having denominators 2, 4, 8, ..., 2^n.
Could be seen as a "fuzzy table" with row lengths 2^n1. In row n one has the numbers, read from the leftmost to the rightmost, as they appear in a perfect binary tree of 2^n1 nodes when inserted in "storage order" into the tree, cf. illustration in A101279 and stackexchange link. These rows are obviously permutations of [1..2^n1], their inverse is given in A269752.  M. F. Hasler, Mar 04 2016


REFERENCES

C. Kimberling, Proper selfcontaining sequences, fractal sequences and parasequences, preprint, 2007.


LINKS

Clark Kimberling, Table of n, a(n) for n = 1..10000
Josef EschgfÃ¤ller, Andrea Scarpante, Dichotomic random number generators, arXiv:1603.08500 [math.CO], 2016.
N.A., References to these functions relating to binary trees and binary digit counting?, Stackexchange forum, Feb 28 2016
Clark Kimberling, Proper selfcontaining sequences, fractal sequences and parasequences, unpublished manuscript, 2007, cached copy, with permission.


FORMULA

When viewed as a table,T(h,p), related to the in order traversal of a full binary tree, T(h,p) = 2^h+(p1)/2,p odd,2^(hm(p))+(p2^m(p))/2^(m(p)+1),where m(p) is the greatest value of n such that p mod 2^n==0.m(p)= padic[ordp](2p,2)1.  Gary Detlefs, Sep 28 2018


EXAMPLE

Start with 1 and isolate it using 2,3, like this: 2,1,3. Then isolate those using 4,5,6,7, like this: 4,2,5,1,6,3,7. The next segment, to be concatenated after 4,2,5,1,6,3,7, is 8,4,9,2,10,5,11,1,12,6,13,3,14,7,15.


MAPLE

m:=p>padic[ordp](2*p, 2)1:podd:=(h, p)>2^h+(p2)/2:peven:=(h, p)>2^(hm(p))+(p2^m(p))/2^(m(p)+1):for i from 0 to 5 do for j from 1 to 2^(i+1)1 do if j mod 2 =1 then print(podd(i, j)) else print(peven(i, j)) fi od od # Gary Detlefs, Sep 28 2018


MATHEMATICA

Flatten@NestList[Riffle[Range[Length[#] + 1, 2 Length[#] + 1], #] &, {1}, 4] (* Birkas Gyorgy, Mar 11 2011 *)


PROG

(PARI) A131987_row(n, r=[1])={for(k=2, n, r=vector(2^k1, j, if(bittest(j, 0), j\2+2^(k1), r[j\2]))); r}
apply(A131987_row, [1..6]) \\ or concat(...) \\ M. F. Hasler, Mar 04 2016


CROSSREFS

Cf. A133108, A001511.
Sequence in context: A108959 A208750 A107893 * A120874 A112382 A117384
Adjacent sequences: A131984 A131985 A131986 * A131988 A131989 A131990


KEYWORD

nonn,tabf


AUTHOR

Clark Kimberling, Aug 05 2007, Sep 12 2007


STATUS

approved



