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.

A364800 The number of iterations that n requires to reach 1 under the map x -> A356874(x).

This page as a plain text file.
%I A364800 #9 Aug 09 2023 02:14:33
%S A364800 0,1,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,4,4,4,
%T A364800 4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
%U A364800 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
%N A364800 The number of iterations that n requires to reach 1 under the map x -> A356874(x).
%C A364800 a(n) is well-defined since A356874(1) = 1, and A356874(n) < n for n >= 2.
%H A364800 Amiram Eldar, <a href="/A364800/b364800.txt">Table of n, a(n) for n = 1..10000</a>
%F A364800 a(n) = a(A356874(n)) + 1, for n >= 2.
%e A364800 For n = 3 the trajectory is 3 -> 2 -> 1. The number of iterations is 2, thus a(3) = 2.
%t A364800 f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; (* A356874 *)
%t A364800 a[n_] := Length@ NestWhileList[f, n, # > 1 &] - 1; Array[a, 100]
%o A364800 (PARI) f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 1));} \\ A356874
%o A364800 a(n) = if(n == 1, 0, a(f(n)) + 1);
%Y A364800 Cf. A356874.
%Y A364800 Similar sequences: A003434, A364801.
%K A364800 nonn,base,easy
%O A364800 1,3
%A A364800 _Amiram Eldar_, Aug 08 2023