OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
MATHEMATICA
f[n_] := If[n == 1, 1, GCD @@ Table[d + n/d, {d, Divisors[n]}]];
b[_] = 1;
a[n_] := a[n] = With[{t = f[n]}, b[t]++];
Array[a, 105] (* Jean-François Alcover, Dec 19 2021 *)
PROG
(PARI)
up_to = 65537;
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; };
A143771b(n) = if(1==n, 1, my(d = divisors(n)); gcd(vector(#d, k, d[k]+n/d[k])));
v339914 = ordinal_transform(vector(up_to, n, A143771b(n)));
A339914(n) = v339914[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 28 2020
STATUS
approved