OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..31031
EXAMPLE
For n=15 we have five alternative paths from 15 to 1: {15, 10, 5, 4, 2, 1}, {15, 10, 8, 4, 2, 1}, {15, 12, 8, 4, 2, 1}, {15, 12, 6, 4, 2, 1}, {15, 12, 6, 3, 2, 1}. These form a lattice illustrated below:
15
/ \
/ \
10 12
/ \ / \
/ \ / \
5 8 6
\__ | __/|
\_|_/ |
4 3
\ /
\ /
2
|
1
With edges going from 15 towards 1, the maximum indegree is 3, which occurs at node 4, therefore a(15) = 3.
MATHEMATICA
With[{s = Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 105]}, Array[If[# == 1, 0, Max@ Tally[#][[All, -1]] &@ Union[Join @@ Map[Partition[#, 2, 1] &, s[[#]] ]][[All, -1]] ] &, Length@ s]] (* Michael De Vlieger, May 02 2020 *)
PROG
(PARI) A332999(n) = { my(m = Map(), nodes = List([n]), x, xps, s=0, u, v); while(#nodes, x = nodes[#nodes]; listpop(nodes); xps = factor(x)[, 1]~; for(i=1, #xps, u=x-(x/xps[i]); if(!mapisdefined(m, u, &v), v=0; listput(nodes, u)); mapput(m, u, v+1); s = max(s, v+1))); (s); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 05 2020
STATUS
approved