A333002 Numerator 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.
1, 3, 6, 7, 12, 25, 39, 15, 43, 47, 69, 76, 115, 37, 198, 31, 48, 209, 304, 46, 302, 317, 432, 203, 71, 500, 344, 640, 901, 899, 1271, 63, 1777, 179, 758, 736, 1069, 786, 465, 361, 525, 789, 1090, 358, 860, 1075, 1404, 506, 1132, 132, 1042, 815, 1133, 918, 1439, 965, 1251, 4165, 5522, 3026, 4307, 6343, 1273, 127
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Programs
-
Mathematica
Map[Numerator@ 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}}}, 63] (* Michael De Vlieger, Apr 15 2020 *)
-
PARI
up_to = 20000; A333002list(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, numerator(v[n]/u[n])); }; v333002 = A333002list(up_to); A333002(n) = v333002[n];