login
A323165
Ordinal transform of A323075 (and also of A323164).
3
1, 1, 1, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 4, 1, 5, 1, 3, 4, 5, 1, 2, 5, 4, 2, 6, 1, 6, 1, 2, 2, 6, 2, 3, 1, 7, 4, 8, 1, 7, 1, 3, 2, 3, 1, 9, 2, 5, 3, 5, 1, 10, 3, 4, 6, 8, 1, 4, 1, 3, 3, 4, 2, 7, 1, 5, 2, 7, 1, 2, 1, 11, 6, 8, 2, 12, 1, 2, 5, 9, 1, 4, 3, 5, 2, 6, 1, 4, 2, 4, 5, 13, 3, 6, 1, 6, 4, 7, 1, 9, 1, 3, 2
OFFSET
1,4
LINKS
MATHEMATICA
f[n_] := n - n/FactorInteger[n][[1, 1]]; (* f is A060681 *)
g[n_] := g[n] = If[n == 1+f[n], n, g[1+f[n]]]; (* g is A323075 *)
b[_] = 0;
a[n_] := a[n] = With[{t = g[n]}, b[t] = b[t]+1];
Array[a, 105] (* Jean-François Alcover, Dec 20 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; };
A060681(n) = (n-if(1==n, n, n/vecmin(factor(n)[, 1])));
A323075(n) = { my(nn = 1+A060681(n)); if(nn==n, n, A323075(nn)); };
v323165 = ordinal_transform(vector(up_to, n, A323075(n)));
A323165(n) = v323165[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 08 2019
STATUS
approved