login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.
4

%I #5 Dec 26 2018 21:35:54

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

%T 21,22,23,8,18,24,13,25,26,27,28,29,30,31,32,33,34,35,36,37,22,38,39,

%U 40,41,42,29,43,44,45,46,47,48,49,50,10,37,51,52,28,53,54,55,56,57,58,59,60,25,61,62,63,64,65,66,67,68,69,70,71,72,73,38

%N Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.

%C Restricted growth sequence transform of A285330.

%H Antti Karttunen, <a href="/A322806/b322806.txt">Table of n, a(n) for n = 1..65537</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 A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947

%o A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675

%o A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); };

%o A285330(n) = if(issquarefree(n),A048675(n),A285328(n));

%o v322806 = rgs_transform(vector(up_to,n,A285330(n)));

%o A322806(n) = v322806[n];

%Y Cf. A048675, A285328, A285330, A285332, A285333, A286543, A322807.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 26 2018