login

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”).

A377643
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.
1
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, 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, 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
OFFSET
1,1
EXAMPLE
For n=1, the trajectory from n down to 8 comprises a(1) = 7 terms: 1 -> 2 -> 4 -> 6 -> 7 -> 9 -> 8.
MAPLE
f := proc(n)
add(op(1, i) * op(2, i), i = ifactors(n)[2]):
end proc:
g := proc(n)
2 + f(n):
end proc:
A377643 := proc(n)
local k, result:
k := 1:
result := n:
while result <> 8 do
result := g(result):
k := k + 1:
end do:
k:
end proc:
A377643(8) := 1:
map(A377643, [$1..100]);
MATHEMATICA
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 *)
CROSSREFS
Cf. A001414 (sopfr).
Sequence in context: A182209 A120634 A178753 * A104178 A092874 A371322
KEYWORD
nonn
AUTHOR
Rafik Khalfi, Nov 03 2024
STATUS
approved