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

Original entry on oeis.org

1, 2, 3, 5, 11, 29, 117, 879, 15279, 963957, 392158939, 2059426052079
Offset: 0

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is the smallest number k such that A364800(k) = n.

Crossrefs

Similar sequences: A007755, A364803.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd, 1, -1]]]]; (* A356874 *)
    iternum[n_] := Length@ NestWhileList[f, n, # > 1 &] - 1; (* A364800 *)
    seq[kmax_] := Module[{s = {}, imax = -1, i}, Do[i = iternum[k]; If[i > imax, imax = i; AppendTo[s, k]], {k, 1, kmax}]; s]
    seq[10^6]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 1));} \\ A356874
    iternum(n) = if(n == 1, 0, iternum(f(n)) + 1); \\ A364800
    lista(kmax) = {my(imax = -1, i1); for(k = 1, kmax, i = iternum(k); if(i > imax, imax = i; print1(k, ", ")));}

Extensions

a(11) from Martin Ehrenstein, Aug 26 2023