cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A053472 a(n) is the cototient of n (A051953) iterated 4 times.

This page as a plain text file.
%I A053472 #16 May 31 2018 02:10:45
%S A053472 0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,4,0,2,0,4,
%T A053472 0,4,0,4,0,4,0,8,0,4,1,4,0,4,0,8,0,4,0,8,0,4,1,8,0,8,0,4,1,4,0,8,0,8,
%U A053472 0,8,0,8,0,8,0,8,0,16,0,8,1,12,0,16,1,8,0,8,0,16,0,8,0,8,0,8,0,8,1,16,0,16
%N A053472 a(n) is the cototient of n (A051953) iterated 4 times.
%C A053472 As iteration of A051953 progresses, powers of 2 may appear and it ends at fixed point 0. Analogous 4th iterates for A000005 or A000010 are A036452 and A049100.
%C A053472 It is assumed here that the value of A051953 at 0 is 0. - _Antti Karttunen_, Dec 22 2017
%H A053472 Antti Karttunen, <a href="/A053472/b053472.txt">Table of n, a(n) for n = 1..16384</a>
%e A053472 n=50, n_1 = n - phi(n) = 50 - 20 = 30, n_2 = n_1 - Phi(n_1) = 30 - 8 = 22, n_3 = 22 - Phi(22) = 12, n_4 = n_3 - Phi(n_3) = 12 - 4 = 8 so the 50th term is 8.
%t A053472 Array[Nest[# - EulerPhi@ # &, #, 4] &, 102] (* _Michael De Vlieger_, Dec 23 2017 *)
%o A053472 (PARI)
%o A053472 A051953(n) = if(!n,n,(n-eulerphi(n))); \\ With modification that returns zero for zero.
%o A053472 A053472(n) = A051953(A051953(A051953(A051953(n)))); \\ _Antti Karttunen_, Dec 22 2017
%Y A053472 Cf. A051953, A000005, A000010, A036452, A049100.
%Y A053472 Cf. A053470, A053471, A053473.
%K A053472 nonn
%O A053472 1,18
%A A053472 _Labos Elemer_, Jan 14 2000