Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Nov 24 2024 09:56:26
%S 7,6,5,5,4,4,3,1,2,3,6,3,5,7,4,4,6,4,5,7,4,5,5,7,4,7,7,6,7,4,6,4,5,5,
%T 8,4,6,6,5,6,8,8,7,7,6,8,6,6,5,8,6,6,6,6,5,5,8,6,7,8,6,9,5,8,8,5,8,6,
%U 7,5,7,8,6,9,5,5,8,8,9,5,8,7,9,5,8,7,6,6,7,5,6,8,5,7,8,5,7,5,6,5
%N a(n) is the number of terms in the trajectory when the map x -> 2+sopfr(x) is iterated, starting from x = n until x = 8, with sopfr = A001414.
%e For n=1, the trajectory from n down to 8 comprises a(1) = 7 terms: 1 -> 2 -> 4 -> 6 -> 7 -> 9 -> 8.
%p f := proc(n)
%p add(op(1, i) * op(2, i), i = ifactors(n)[2]):
%p end proc:
%p g := proc(n)
%p 2 + f(n):
%p end proc:
%p A377643 := proc(n)
%p local k, result:
%p k := 1:
%p result := n:
%p while result <> 8 do
%p result := g(result):
%p k := k + 1:
%p end do:
%p k:
%p end proc:
%p A377643(8) := 1:
%p map(A377643, [$1..100]);
%t s[n_] := 2 + Plus @@ Times @@@ FactorInteger[n]; s[1] = 2; a[n_] := Length@ NestWhileList[s, n, # != 8 &]; Array[a, 100] (* _Amiram Eldar_, Nov 07 2024 *)
%Y Cf. A001414 (sopfr).
%K nonn
%O 1,1
%A _Rafik Khalfi_, Nov 03 2024