login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049113 Number of powers of 2 in sequence obtained when phi (A000010) is repeatedly applied to n. 6

%I #16 Sep 08 2021 07:13:45

%S 1,2,2,3,3,2,2,4,2,3,3,3,3,2,4,5,5,2,2,4,3,3,3,4,4,3,2,3,3,4,4,6,4,5,

%T 4,3,3,2,4,5,5,3,3,4,4,3,3,5,3,4,6,4,4,2,5,4,3,3,3,5,5,4,3,7,5,4,4,6,

%U 4,4,4,4,4,3,5,3,5,4,4,6,2,5,5,4,7,3,4,5,5,4,4,4,5,3,4,6,6,3,5,5,5,6,6,5,5

%N Number of powers of 2 in sequence obtained when phi (A000010) is repeatedly applied to n.

%F a(n) = A049108(n)-A049115(n). - _R. J. Mathar_, Sep 08 2021

%e If n=164, the "iterated phi-sequence" for n is {164,80,32,16,8,4,2,1}. It includes 6 powers of 2 at the end, so a(164)=6.

%p A049113 := proc(n)

%p local a, e;

%p e := n ;

%p a :=0 ;

%p while e > 1 do

%p if isA000079(e) then

%p a := a+1 ;

%p end if;

%p e := numtheory[phi](e) ;

%p end do:

%p 1+a;

%p end proc:

%p seq(A049113(n),n=1..40) ; # _R. J. Mathar_, Jan 09 2017

%t pwrs2 = NestList[2#&, 1, 15];

%t Table[Length[Intersection[NestWhileList[EulerPhi[#]&, i, # > 1 &], pwrs2]], {i, 100}] (* _Harvey P. Dale_, Dec 12 2010 *)

%o (PARI) a(n)=while(n!=1<<valuation(n,2),n=eulerphi(n)); valuation(n,2)+1 \\ _Charles R Greathouse IV_, Feb 21 2013

%Y Cf. A000010, A049115, A049108.

%K nonn

%O 1,2

%A _Labos Elemer_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 03:58 EDT 2024. Contains 374441 sequences. (Running on oeis4.)