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.

A340765 Numbers k such that iterations of phi(k), phi(phi(k)), ... end in ... 6, 2, 1.

This page as a plain text file.
%I A340765 #27 May 29 2022 21:42:30
%S A340765 6,7,9,14,18,19,27,38,54,81,162,163,243,326,486,487,729,974,1458,1459,
%T A340765 2187,2918,4374,6561,13122,19683,39366,39367,59049,78734,118098,
%U A340765 177147,354294,531441,1062882,1594323,3188646,4782969,9565938,14348907,28697814,43046721,86093442,86093443,129140163,172186886
%N A340765 Numbers k such that iterations of phi(k), phi(phi(k)), ... end in ... 6, 2, 1.
%C A340765 Infinite set (see reference).
%C A340765 Contains 3^k for k >= 2 and 2*3^k for k >= 1, and all members of A111974 except 3. - _Robert Israel_, Dec 23 2021
%H A340765 Robert Israel, <a href="/A340765/b340765.txt">Table of n, a(n) for n = 1..1000</a>
%H A340765 Eliot T. Jacobson and Alan E. Parks, <a href="https://www.jstor.org/stable/2323032">Infinite branches of the phi-tree</a>, Amer. Math. Monthly, Vol. 93, No. 7 (August-September 1986), pp. 552-554.
%H A340765 Keith Matthews, <a href="http://www.numbertheory.org/php/carmichael.html">Solving phi(x)=n, where phi(x) is Euler's totient function</a>.
%e A340765 19 is in the list because phi(phi(19)) = phi(18) = 6.
%p A340765 R:= {6}: Agenda:= {6}: count:= 1:
%p A340765 while count - nops(Agenda) < 99 do
%p A340765   v:= min(Agenda);
%p A340765   W:= convert(numtheory:-invphi(v),set);
%p A340765   count:= count + nops(W);
%p A340765   Agenda:= Agenda minus {v} union W;
%p A340765   R:= R union W;
%p A340765 od:
%p A340765 sort(select(`<=`, convert(R,list),min(Agenda))); # _Robert Israel_, Dec 23 2021
%t A340765 Select[Range[4, 10000], FixedPointList[EulerPhi, #][[-4]] == 6 &] (* _Amiram Eldar_, Jan 27 2021 *)
%o A340765 (PARI) isok(k) = if (k>=6, while((k!=6) && (k!=4), k=eulerphi(k))); k == 6; \\ _Michel Marcus_, Feb 01 2021
%Y A340765 Cf. A000010, A340762 (complement relative to {n>=4}).
%Y A340765 Cf. A003434, A032358, A049108, A111974.
%K A340765 nonn
%O A340765 1,1
%A A340765 _Franz Vrabec_, Jan 20 2021