login
a(n) = gcd(A032742(n), A302042(n)).
5

%I #6 Aug 24 2019 11:56:45

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

%T 16,1,17,7,18,1,19,1,20,1,21,1,22,3,23,1,24,7,25,1,26,1,27,1,28,1,29,

%U 1,30,1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,38,11,39,1,40,3,41,1,42,1,43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,1,52,1

%N a(n) = gcd(A032742(n), A302042(n)).

%H Antti Karttunen, <a href="/A326139/b326139.txt">Table of n, a(n) for n = 1..65537</a>

%F a(n) = gcd(A032742(n), A302042(n)).

%o (PARI)

%o up_to = 65537;

%o ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };

%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 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639

%o A032742(n) = (n/A020639(n));

%o v078898 = ordinal_transform(vector(up_to,n,A020639(n)));

%o A078898(n) = v078898[n];

%o A302042(n) = if((1==n)||isprime(n),1,my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p));

%o A326139(n) = gcd(A032742(n),A302042(n));

%Y Cf. A032742, A302042, A323888, A326075, A326189, A326190, A326191.

%K nonn

%O 1,4

%A _Antti Karttunen_, Aug 23 2019