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!)
A180633 a(n) is the number of iterations of function f(x) = phi(x)-1 needed before zero is reached, when starting from the initial value x = n. 1

%I #20 Aug 07 2017 23:06:14

%S 0,1,1,2,2,3,2,4,3,4,3,5,3,6,4,5,5,6,4,7,5,6,5,7,5,8,6,7,6,8,5,9,6,8,

%T 6,8,6,9,7,8,6,9,6,10,8,8,7,9,6,10,8,10,8,11,7,9,8,9,8,10,6,11,9,9,10,

%U 10,8,11,10,11,8,12,8,13,9,9,9,11,8,12,10,12,9,13,8,10,10,10,9,11,8,13,11

%N a(n) is the number of iterations of function f(x) = phi(x)-1 needed before zero is reached, when starting from the initial value x = n.

%C Since phi(n) < n it follows that phi(n)-1 < n-1; therefore, after each iteration the argument decreases and eventually will reach zero.

%C Solution of equation phi(-1 + phi(-1 + phi(-1 + ...(phi(n))...))) = 1 where the totient function phi is applied a(n) times. (The original name of the sequence.)

%H Antti Karttunen, <a href="/A180633/b180633.txt">Table of n, a(n) for n = 0..10000</a>

%F a(0) = 0; for n >= 1, a(n) = 1 + a(A000010(n)-1). - _Antti Karttunen_, Aug 07 2017

%e a(11)=5 since phi(-1+phi(-1+phi(-1+phi(-1+phi(-1+phi(11))))))=

%e phi(-1+phi(-1+phi(-1+phi(-1+phi(-1+10)))))=

%e phi(-1+phi(-1+phi(-1+phi(-1+6))))=

%e phi(-1+phi(-1+phi(-1+4)))=

%e phi(-1+phi(-1+2))=

%e phi(-1+1)=1 after 5 iterations.

%t f[n_] := If[n < 3, 1, Length@ NestWhileList[ EulerPhi@# -1 &, n, # != 1 &]]; Array[f, 93, 0] (* _Robert G. Wilson v_, Sep 25 2010 *)

%o (Scheme) (define (A180633 n) (if (zero? n) n (+ 1 (A180633 (+ -1 (A000010 n)))))) ;; _Antti Karttunen_, Aug 07 2017

%Y Cf. A000010.

%Y Cf. A049108. - _Robert G. Wilson v_, Sep 25 2010

%K nonn

%O 0,4

%A _Carmine Suriano_, Sep 13 2010

%E Corrected a(18), a(19) & a(73) and extended past a(80) by _Robert G. Wilson v_, Sep 25 2010

%E Name changed and value of a(0) changed from 1 to 0 by _Antti Karttunen_, Aug 07 2017

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 April 17 20:27 EDT 2024. Contains 371767 sequences. (Running on oeis4.)