login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A323234
Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, and for n > 1, f(n) = ordered pair [A053645(n), A079944(n-2)], where A053645(n) gives n without its most significant bit, while A079944(n-2) gives the second most significant bit of n.
4
1, 2, 3, 2, 4, 5, 6, 2, 4, 7, 8, 9, 10, 11, 12, 2, 4, 7, 8, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 2, 4, 7, 8, 13, 14, 15, 16, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 2, 4, 7, 8, 13, 14, 15, 16, 25, 26, 27, 28, 29, 30, 31, 32, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61
OFFSET
1,2
COMMENTS
Also the restricted growth sequence transform of function f(1) = 0, f(n) = [A053645(n), A278222(n)] for n > 1.
For all i, j:
a(i) = a(j) => A286622(i) = A286622(j),
a(i) = a(j) => A323235(i) = A323235(j),
a(i) = a(j) => A323236(i) = A323236(j).
PROG
(PARI)
up_to = 65537;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644
A053645(n) = (n-A053644(n));
A079944off0(n) = (1==binary(2+n)[2]);
A323234aux(n) = if(1==n, 0, [A053645(n), A079944off0(n-2)]);
v323234 = rgs_transform(vector(up_to, n, A323234aux(n)));
A323234(n) = v323234[n];
CROSSREFS
Cf. also A300226 (an analogous filter sequence for prime factorization).
Sequence in context: A336152 A323898 A336154 * A336156 A336474 A336148
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 08 2019
STATUS
approved