login
A361020
Lexicographically earliest infinite sequence such that a(i) = a(j) => A343029(i) = A343029(j) and A343030(i) = A343030(j) for all i, j >= 0.
1
1, 2, 3, 4, 2, 5, 6, 7, 3, 4, 5, 8, 4, 9, 10, 11, 2, 5, 6, 7, 5, 8, 9, 12, 6, 7, 8, 13, 7, 14, 15, 16, 3, 4, 5, 8, 4, 9, 10, 11, 5, 8, 9, 12, 8, 13, 14, 17, 4, 9, 10, 11, 9, 12, 13, 18, 10, 11, 12, 19, 11, 20, 21, 22, 2, 5, 6, 7, 5, 8, 9, 12, 6, 7, 8, 13, 7, 14, 15, 16, 5, 8, 9, 12, 8, 13, 14, 17, 9, 12, 13, 18, 12, 19, 20, 23, 6, 7, 8
OFFSET
0,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A343029(n), A343030(n)].
For all i, j >= 0:
a(i) = a(j) => A000120(i) = A000120(j),
a(i) = a(j) => A004718(i) = A004718(j) => A361016(i) = A361016(j).
Because the Danish composer Per Nørgård's "infinity sequence" (A004718) can be represented as an difference A343029(n) - A343030(n), it is a function of this sequence, whose scatter plot shows interesting structure. (The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.)
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; };
A343029(n) = { my(t=1, ret=0); for(i=0, if(n, logint(n, 2)), if(bittest(n, i), ret+=t, t=!t)); ret; }; \\ From A343029
A343030(n) = { my(t=0, ret=0); for(i=0, if(n, logint(n, 2)), if(bittest(n, i), ret+=t, t=!t)); ret; }; \\ From A343030
Aux361020(n) = [A343029(n), A343030(n)];
v361020 = rgs_transform(vector(1+up_to, n, Aux361020(n-1)));
A361020(n) = v361020[1+n];
CROSSREFS
Cf. also A286622.
Sequence in context: A026346 A340791 A369422 * A368693 A333235 A295887
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Mar 03 2023
STATUS
approved