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.

A066919 a(n) = least number of applications of f to n to reach 1, where f is defined by f(n) = phi(n) if n is even; = sigma(n) if n is odd.

This page as a plain text file.
%I A066919 #12 Jun 16 2018 14:39:24
%S A066919 0,1,3,2,3,2,4,3,5,3,4,3,4,3,5,4,4,3,5,4,6,4,5,4,7,4,6,4,5,4,6,5,6,5,
%T A066919 6,4,5,4,6,5,5,4,6,5,6,5,6,5,8,5,6,5,5,4,6,5,7,5,6,5,6,5,7,6,6,5,7,6,
%U A066919 7,5,6,5,6,5,7,5,7,5,7,6,10,6,6,5,6,5,7,6,6,5,7,6,8,6,7,6,6,5,7,6,7,6,7,6
%N A066919 a(n) = least number of applications of f to n to reach 1, where f is defined by f(n) = phi(n) if n is even; = sigma(n) if n is odd.
%C A066919 a(n) is in [0,19] for n < 10^5. Conjecture: a(n) exists for all n, i.e. repeated application of f to n eventually yields 1, for any n. The only way this could fail is if n, f(n), f(f(n)), ... are all odd squares.
%C A066919 The conjecture is true, since sequence A055021 (smallest x such that n iterations of sigma() are required for the result to be >= 2x) is complete. - _Vim Wenders_, Apr 07 2008
%e A066919 f(f(f(f(7)))) = f(f(f(8))) = f(f(4)) = f(2) = 1 and 4 applications of f are required to achieve this. Therefore a(7) = 4.
%t A066919 f[n_] := If[EvenQ[n], EulerPhi[n], DivisorSigma[1, n]]; a[n_] := Module[{b=n, k=0}, While[b>1, b=f[b]; k++ ]; k]; Table[a[i], {i, 1, 105}]
%t A066919 Table[Length[NestWhileList[If[EvenQ[#],EulerPhi[#],DivisorSigma[1,#]]&,n,#!=1&]],{n,110}]-1 (* _Harvey P. Dale_, Jun 16 2018 *)
%K A066919 nonn
%O A066919 1,3
%A A066919 _Joseph L. Pe_, Jan 23 2002
%E A066919 Edited by _Dean Hickerson_, Oct 26 2002