|
|
A256757
|
|
Number of iterations of A007733 required to reach 1.
|
|
5
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
A007733 = Function[n, MultiplicativeOrder[2, n/(2^IntegerExponent[n, 2])]];
a = Function[n, k = 0; m = n; While[m > 1, m = A007733[m]; k++]; k];
|
|
PROG
|
(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
(Haskell)
a256757 n = fst $ until ((== 1) . snd)
(\(i, x) -> (i + 1, fromIntegral $ a007733 x)) (0, n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|