%I #10 Apr 15 2020 12:30:41
%S 1,1,1,1,1,2,2,1,2,2,2,3,3,1,5,1,1,5,5,1,5,5,5,4,1,7,5,9,9,12,12,1,17,
%T 2,7,9,9,7,4,4,4,7,7,3,7,7,7,5,7,1,7,6,6,7,8,7,7,23,23,21,21,33,7,1,
%U 11,47,47,1,61,28,28,7,7,23,14,2,103,3,3,5,7,1,1,1,4,21,79,7,7,7,7,7,89,7,14,2,2,21,103,1,1,16,16,18,84
%N Denominator of the average path sum when iterating from n to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.
%H Antti Karttunen, <a href="/A333003/b333003.txt">Table of n, a(n) for n = 1..20000</a>
%F a(n) = denominator(A333000(n)/A333123(n)).
%t Map[Denominator@ Mean[Total /@ #] &, #] &@ Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 104] (* _Michael De Vlieger_, Apr 15 2020 *)
%o (PARI)
%o up_to = 20000;
%o A333003list(up_to) = { my(u=vector(up_to), v=vector(up_to)); u[1] = v[1] = 1; for(n=2,up_to, my(ps=factor(n)[, 1]~); u[n] = vecsum(apply(p -> u[n-n/p], ps)); v[n] = (u[n]*n)+vecsum(apply(p -> v[n-n/p], ps))); vector(up_to, n, denominator(v[n]/u[n])); };
%o v333003 = A333003list(up_to);
%o A333003(n) = v333003[n];
%Y See A333002 for numerator.
%Y Cf. A333000, A333001, A333123, A333785 (positions of ones).
%K nonn,frac
%O 1,6
%A _Antti Karttunen_, Apr 06 2020