login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A072086
Number of steps to reach 1, starting with n and applying the A072084-map repeatedly.
3
0, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 2, 1, 2, 2, 3, 2, 3, 3, 2, 2, 2, 3, 2, 3, 2, 2, 3, 1, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 1, 3, 3, 3, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 3, 3, 3, 2
OFFSET
1,3
LINKS
EXAMPLE
n=21: '11'*'111' -> '10'*'11' -> '11'*'1' -> '1'; i.e., 21=3*7 -> 6=2*3 -> 2*1 -> 1*1=1, therefore a(21)=3.
MAPLE
A072086 := proc(n) local c, i, j; c :=0; i := n;
while i > 1 do i:=A072084(i); c:=c+1 od; c end:
# Note that this gives A072086(0)=0 if desired
# without any additional case discrimination.
# Peter Luschny, Jan 16 2010
MATHEMATICA
b[1] = 1; b[n_] := Times @@ Power @@@ (FactorInteger[n] /. {p_Integer, e_} :> {DigitCount[p, 2, 1], e}); a[n_] := Length[FixedPointList[b, n]] - 2; Array[a, 100] (* Jean-François Alcover, Feb 09 2018 *)
PROG
(Haskell)
a072086 n = fst $
until ((== 1) . snd) (\(i, x) -> (i + 1, a072084 x)) (0, n)
-- Reinhard Zumkeller, Feb 10 2013
CROSSREFS
Cf. A072085.
Sequence in context: A359312 A179868 A104232 * A180094 A333870 A354914
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 14 2002
STATUS
approved