login
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 0, where f(n) = 0 if n is a Fibbinary number (A003714), otherwise f(n) = n.
1

%I #8 May 23 2021 03:21:27

%S 1,1,1,2,1,1,3,4,1,1,1,5,6,7,8,9,1,1,1,10,1,1,11,12,13,14,15,16,17,18,

%T 19,20,1,1,1,21,1,1,22,23,1,1,1,24,25,26,27,28,29,30,31,32,33,34,35,

%U 36,37,38,39,40,41,42,43,44,1,1,1,45,1,1,46,47,1,1,1,48,49,50,51,52,1,1,1,53,1,1,54,55,56,57

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 0, where f(n) = 0 if n is a Fibbinary number (A003714), otherwise f(n) = n.

%C For all i, j:

%C a(i) = a(j) => A085357(i) = A085357(j),

%C a(i) = a(j) => A213370(i) = A213370(j),

%C a(i) = a(j) => A344182(i) = A344182(j).

%H Antti Karttunen, <a href="/A344180/b344180.txt">Table of n, a(n) for n = 0..65537</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%o (PARI)

%o up_to = 65537;

%o 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; };

%o Aux344180(n) = if(!bitand(n,n+n),0,n);

%o v344180 = rgs_transform(vector(1+up_to,n,Aux344180(n-1)));

%o A344180(n) = v344180[1+n];

%Y Cf. A003714 (positions of 1's), A085357, A213370, A344182.

%Y Cf. also A324400.

%K nonn

%O 0,4

%A _Antti Karttunen_, May 16 2021