A339914 Ordinal transform of sequence b(1) = 1, b(n) = A143771(n) for n > 1.
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, 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, 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
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
- Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
Programs
-
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 *)
-
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];