Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Jul 22 2017 10:12:56
%S 1,1,2,2,3,2,4,5,4,3,6,5,7,4,8,6,9,4,10,6,11,6,11,12,13,7,14,10,15,8,
%T 16,17,18,9,19,10,14,10,20,21,22,11,23,21,24,11,25,21,26,13,27,14,28,
%U 14,24,29,30,15,31,32,33,16,34,35,36,18,11,19,37,19,22,29,38,14,39,29,40,20,41,42,24,22,43,23,44,23,45,46,47,24,44,23,48,25
%N Restricted growth sequence transform of A289625(A005940(1+n)).
%C For all i, j: a(i) = a(j) => A290077(i) = A290077(j).
%H Antti Karttunen, <a href="/A290076/b290076.txt">Table of n, a(n) for n = 0..8192</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%o (PARI)
%o allocatemem(2^31);
%o rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
%o write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of _M. F. Hasler_
%o A289625(n) = { my(m=1,p=2,v=znstar(n)[2]); for(i=1,length(v),m *= p^v[i]; p = nextprime(p+1)); (m); };
%o write_to_bfile(0,rgs_transform(vector(8193,n,A289625(A005940((1+n)-1)))),"b290076_upto8192.txt");
%Y Cf. A005940, A289626, A290077, A290082.
%K nonn
%O 0,3
%A _Antti Karttunen_, Jul 19 2017