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!)
A331303 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = min(n, A263273(n)), and A263273 is bijective base-3 reverse. 2

%I #6 Jan 18 2020 18:23:39

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

%T 22,23,24,25,26,27,28,29,30,31,32,27,33,34,35,36,37,38,39,40,30,41,42,

%U 38,43,44,45,46,47,25,48,29,33,49,50,41,51,40,28,49,37,36,52,53,43,54,55,31,51,44,39,54,56,46,57,58,59,60,61,62,63,64,65,66,67,68,69

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = min(n, A263273(n)), and A263273 is bijective base-3 reverse.

%C Restricted growth sequence transform of A331173. See comments in that sequence.

%H Antti Karttunen, <a href="/A331303/b331303.txt">Table of n, a(n) for n = 0..100000</a>

%o (PARI)

%o up_to = 100000;

%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 A030102(n) = { my(r=[n%3]); while(0<n\=3, r=concat(n%3, r)); subst(Polrev(r),x,3); };

%o A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3)));

%o A331173(n) = min(n, A263273(n));

%o v331303 = rgs_transform(vector(1+up_to,n,A331173(n-1)));

%o A331303(n) = v331303[1+n];

%Y Cf. A263273, A331173.

%Y Cf. also A331300.

%K nonn,base

%O 0,2

%A _Antti Karttunen_, Jan 18 2020

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 April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)