login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A323236 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, f(n) = -1 if n is an even number > 2, and f(n) = A323234(n) for odd numbers >= 3. 2

%I #6 Jan 08 2019 19:08:19

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

%T 4,2,6,2,9,2,10,2,15,2,16,2,17,2,18,2,19,2,20,2,21,2,22,2,23,2,24,2,

%U 25,2,26,2,4,2,6,2,9,2,10,2,15,2,16,2,17,2,18,2,27,2,28,2,29,2,30,2,31,2,32,2,33,2,34,2,35,2,36,2,37,2,38,2,39

%N Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, f(n) = -1 if n is an even number > 2, and f(n) = A323234(n) for odd numbers >= 3.

%C For all i, j:

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

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

%H Antti Karttunen, <a href="/A323236/b323236.txt">Table of n, a(n) for n = 1..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 A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644

%o A053645(n) = (n-A053644(n));

%o A079944off0(n) = (1==binary(2+n)[2]);

%o A323236aux(n) = if(1==n,0,if(!(n%2),-1,[A053645(n), A079944off0(n-2)]));

%o v323236 = rgs_transform(vector(up_to,n,A323236aux(n)));

%o A323236(n) = v323236[n];

%Y Cf. A053645, A079944, A319702, A323234.

%Y Cf. also A323242 (somewhat analogous filter sequence for prime factorization).

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 08 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 16:43 EDT 2024. Contains 375269 sequences. (Running on oeis4.)