OFFSET
1,2
COMMENTS
Unlike the analogous sequence with A000005, the powers of 2 which emerge are consecutive iterates.
EXAMPLE
n=7, initial value=7!=5040, the successive iterates when cototient function (A051953) is repeatedly applied are: {5040,3888,2592,1728,1152,768,512,256,128,64,32,16,8,4,2,1,0}. Between the initial segment and terminal 0, ten powers of 2 emerge: 512,...,1. Thus a(7)=10.
MATHEMATICA
a[n_] := Module[{x = n!}, While[ ! IntegerQ[Log[2, x]], x = x - EulerPhi[x]; ]; Log[2, x] + 1]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Sep 12 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 24 2000
EXTENSIONS
More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Sep 12 2006
STATUS
approved