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 infinite sequence such that a(i) = a(j) => A319626(i) = A319626(j) for all i, j.
3

%I #8 Dec 29 2019 19:35:39

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

%T 25,26,5,27,28,29,30,6,8,31,32,33,34,35,18,36,37,38,39,40,41,42,43,44,

%U 45,46,24,47,48,49,50,51,9,52,53,54,55,56,29,57,58,59,13,60,61,62,63,22,64,10,33,65,66,67,68,69,70,71,72,73,74,75,38,76

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

%C Restricted growth sequence transform of A319626, where A319626(n) = n / A330749(n) = n / gcd(n, A064989(n)).

%H Antti Karttunen, <a href="/A330750/b330750.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 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A319626(n) = (n / gcd(n, A064989(n)));

%o v330750 = rgs_transform(vector(up_to, n, A319626(n)));

%o A330750(n) = v330750[n];

%Y Cf. A064989, A319626, A330749.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 29 2019