cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A377643 #14 Nov 24 2024 09:56:26
%S A377643 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 A377643 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 A377643 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 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.
%e A377643 For n=1, the trajectory from n down to 8 comprises a(1) = 7 terms: 1 -> 2 -> 4 -> 6 -> 7 -> 9 -> 8.
%p A377643 f := proc(n)
%p A377643   add(op(1, i) * op(2, i), i = ifactors(n)[2]):
%p A377643 end proc:
%p A377643 g := proc(n)
%p A377643   2 + f(n):
%p A377643 end proc:
%p A377643 A377643 := proc(n)
%p A377643 local k, result:
%p A377643  k := 1:
%p A377643 result := n:
%p A377643 while result <> 8 do
%p A377643 result := g(result):
%p A377643 k := k + 1:
%p A377643 end do:
%p A377643 k:
%p A377643 end proc:
%p A377643 A377643(8) := 1:
%p A377643 map(A377643, [$1..100]);
%t A377643 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 A377643 Cf. A001414 (sopfr).
%K A377643 nonn
%O A377643 1,1
%A A377643 _Rafik Khalfi_, Nov 03 2024