Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Dec 19 2021 11:57:35
%S 1,1,1,2,1,3,1,2,1,4,1,5,1,3,2,6,1,7,1,4,2,8,1,9,3,5,2,10,1,11,1,6,4,
%T 12,2,13,1,7,3,14,1,15,1,8,5,16,1,17,6,9,3,18,1,19,4,10,7,20,1,21,1,
%U 11,5,22,2,23,1,12,8,24,1,25,1,13,4,26,3,27,1,14,9,28,1,29,10,15,6,30,1,31,5,16,11,32,2
%N Ordinal transform of sequence b(1) = 1, b(n) = A143771(n) for n > 1.
%H Antti Karttunen, <a href="/A339914/b339914.txt">Table of n, a(n) for n = 1..16384</a>
%H Antti Karttunen, <a href="/A339914/a339914.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%t f[n_] := If[n == 1, 1, GCD @@ Table[d + n/d, {d, Divisors[n]}]];
%t b[_] = 1;
%t a[n_] := a[n] = With[{t = f[n]}, b[t]++];
%t Array[a, 105] (* _Jean-François Alcover_, Dec 19 2021 *)
%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 A143771b(n) = if(1==n,1, my(d = divisors(n)); gcd(vector(#d, k, d[k]+n/d[k])));
%o v339914 = ordinal_transform(vector(up_to,n,A143771b(n)));
%o A339914(n) = v339914[n];
%Y Cf. A143771, A339873.
%K nonn
%O 1,4
%A _Antti Karttunen_, Dec 28 2020