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.

A364802 Smallest number that reaches 1 after n iterations of the map x -> A356874(x).

This page as a plain text file.
%I A364802 #12 Aug 26 2023 04:49:10
%S A364802 1,2,3,5,11,29,117,879,15279,963957,392158939,2059426052079
%N A364802 Smallest number that reaches 1 after n iterations of the map x -> A356874(x).
%C A364802 a(n) is the smallest number k such that A364800(k) = n.
%t A364802 f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; (* A356874 *)
%t A364802 iternum[n_] := Length@ NestWhileList[f, n, # > 1 &] - 1; (* A364800 *)
%t A364802 seq[kmax_] := Module[{s = {}, imax = -1, i}, Do[i = iternum[k]; If[i > imax, imax = i; AppendTo[s, k]], {k, 1, kmax}]; s]
%t A364802 seq[10^6]
%o A364802 (PARI) f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 1));} \\ A356874
%o A364802 iternum(n) = if(n == 1, 0, iternum(f(n)) + 1); \\ A364800
%o A364802 lista(kmax) = {my(imax = -1, i1); for(k = 1, kmax, i = iternum(k); if(i > imax, imax = i; print1(k, ", ")));}
%Y A364802 Cf. A356874, A364800.
%Y A364802 Similar sequences: A007755, A364803.
%K A364802 nonn,base,more
%O A364802 0,2
%A A364802 _Amiram Eldar_, Aug 08 2023
%E A364802 a(11) from _Martin Ehrenstein_, Aug 26 2023