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) => A185633(i) = A185633(j) for all i, j.
5

%I #6 Dec 03 2018 18:30:39

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

%T 15,1,2,1,16,1,2,1,17,1,18,1,19,1,20,1,21,1,6,1,22,1,23,1,24,1,25,1,

%U 26,1,2,1,27,1,28,1,3,1,29,1,30,1,2,1,3,1,31,1,32,1,33,1,34,1,2,1,35,1,36,1,37,1,2,1,38,1,2,1,39,1,40,1,41,1

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

%C Restricted growth sequence transform of A185633.

%C For all i, j: a(i) = a(j) => A322313(i) = A322313(j).

%H Antti Karttunen, <a href="/A322315/b322315.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 A185633(n) = { my(m=1); fordiv(n, d, if(isprime(1+d), m *= (1+d)^(1+valuation(n,1+d)))); (m); };

%o v322315 = rgs_transform(vector(up_to, n, A185633(n)));

%o A322315(n) = v322315[n];

%Y Cf. A185633, A322313.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 03 2018