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.
%I A256757 #18 Oct 11 2016 15:34:32 %S A256757 0,1,2,1,2,2,3,1,3,2,3,2,3,3,2,1,2,3,4,2,3,3,4,2,3,3,4,3,4,2,3,1,3,2, %T A256757 3,3,4,4,3,2,3,3,4,3,3,4,5,2,4,3,2,3,4,4,3,3,4,4,5,2,3,3,3,1,3,3,4,2, %U A256757 4,3,4,3,4,4,3,4,3,3,4,2,5,3,4,3,2,4,4,3,4,3,3,4,3,5,4,2,3,4,3,3 %N A256757 Number of iterations of A007733 required to reach 1. %C A256757 In other words, the minimal height (not counting k) of the power tower 2^(2^(...^(2^k)...)) required to make it eventually constant modulo n (=A245970(n)) for sufficiently large k. %C A256757 a(n) <= A227944(n) + 1. - _Max Alekseyev_, Oct 11 2016 %H A256757 Ivan Neretin, <a href="/A256757/b256757.txt">Table of n, a(n) for n = 1..10000</a> %F A256757 For n>1, a(n) = a(A007733(n)) + 1. %t A256757 A007733 = Function[n, MultiplicativeOrder[2, n/(2^IntegerExponent[n, 2])]]; %t A256757 a = Function[n, k = 0; m = n; While[m > 1, m = A007733[m]; k++]; k]; %t A256757 Table[a[n], {n, 100}] (* _Ivan Neretin_, Apr 13 2015 *) %o A256757 (PARI) a(n) = {if (n==1, return(0)); nb = 1; while((n = znorder(Mod(2, n/2^valuation(n, 2)))) != 1, nb++); nb;} \\ _Michel Marcus_, Apr 11 2015 %o A256757 (Haskell) %o A256757 a256757 n = fst $ until ((== 1) . snd) %o A256757 (\(i, x) -> (i + 1, fromIntegral $ a007733 x)) (0, n) %o A256757 -- _Reinhard Zumkeller_, Apr 13 2015 %Y A256757 Cf. A007733, A256607 (second iteration), A256758 (positions of records), A003434, A227944 (similarly built upon the totient function). %K A256757 nonn,easy %O A256757 1,3 %A A256757 _Ivan Neretin_, Apr 09 2015