OFFSET
1,2
COMMENTS
A fractal sequence. The para-sequence may be regarded as a sort of "limit" of the concatenated segments. The para-sequence (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 para-sequence 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 n-th segment consists of labels for rationals having denominators 2, 4, 8, ..., 2^n.
Could be seen as a "fuzzy table" with row lengths 2^n-1. In row n one has the numbers, read from the leftmost to the rightmost, as they appear in a perfect binary tree of 2^n-1 nodes when inserted in "storage order" into the tree, cf. illustration in A101279 and stackexchange link. These rows are obviously permutations of [1..2^n-1], their inverse is given in A269752. - M. F. Hasler, Mar 04 2016
Subsequence of A025480 (omitting all terms=0). - David James Sycamore, Apr 26 2020
The sequence obtained by adding 1 to every term of this sequence is the same as A003602 with all 1's removed. - David James Sycamore, Jul 25 2022
REFERENCES
C. Kimberling, Proper self-containing sequences, fractal sequences and para-sequences, 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, Self-Containing Sequences, Selection Functions, and Parasequences, J. Int. Seq. Vol. 25 (2022), Article 22.2.1.
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+(p-1)/2, p odd, 2^(h-m(p)) + (p-2^m(p)) / 2^(m(p)+1), where m(p) is the greatest value of n such that p mod 2^n == 0. m(p) = p-adic[ordp](2*p,2)-1. - Gary Detlefs, Sep 28 2018
a((2*n+1)*2^k - k - A070941(n)) = n = A025480((2*n+1)*2^k - 1); (n>=1, k>=0). - David James Sycamore, Apr 26 2020
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+(p-2)/2:peven:=(h, p)->2^(h-m(p))+(p-2^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^k-1, j, if(bittest(j, 0), j\2+2^(k-1), r[j\2]))); r}
apply(A131987_row, [1..6]) \\ or concat(...) \\ M. F. Hasler, Mar 04 2016
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Clark Kimberling, Aug 05 2007, Sep 12 2007
STATUS
approved