OFFSET
1,1
COMMENTS
See A057684 for definition.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A368085(n,n).
EXAMPLE
For n= 4: prime(4) = 7 -> 50 -> 25 -> 5 = a(4).
For n= 5: prime(5) = 11 -> 122 -> 61 -> 672 -> 336 = a(5).
For n= 6: prime(6) = 13 -> 170 -> 85 -> 17 -> 222 -> 111 = a(6).
For n=13: prime(13) = 41 -> 1682 -> 841 -> 29 -> 1 -> 42 ->
21 -> 7 -> 1 -> 42 -> 21 -> 7 -> 1 = a(13).
MATHEMATICA
Px1[p_, n_]:=Catch[For[i=1, i<PrimePi[p], i++, If[Divisible[n, Prime[i]], Throw[n/Prime[i]]]]; p*n+1];
A368159[n_]:=Nest[Px1[Prime[n], #]&, Prime[n], n-1];
Array[A368159, 100] (* Paolo Xausa, Dec 14 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 13 2023
STATUS
approved