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!)
A173447 The number of iterations for the map r -> A061602(r), starting with n, needed to reach the end of the first cycle. 3

%I #17 Sep 08 2022 08:45:50

%S 1,0,0,15,7,9,14,31,35,34,1,1,16,32,12,9,14,31,35,34,16,16,8,36,6,11,

%T 5,7,32,30,32,32,36,17,33,30,47,38,23,7,12,12,6,33,29,53,41,38,28,51,

%U 9,9,11,30,53,9,23,20,40,23,14

%N The number of iterations for the map r -> A061602(r), starting with n, needed to reach the end of the first cycle.

%C The sequence counts the iterations needed to reach a cycle (or loop) of numbers.

%C The reference (below) proves that the sequence of this numbers is finite and complete.

%C For n=1, the cycle is (1, 1, 1, ...). For each integer n > 1, the iterations enter one of the following 6 loops:

%C 2, 2, 2, ...

%C 145, 145, 145, ...

%C 169, 363601, 1454, 169, ...

%C 871, 45361, 871, ...

%C 872, 45362, 872, ...

%C 40585, 40585, 40585, ...

%C The set of numbers occurring in the 7 loops is {1, 2, 145, 169, 871, 872, 1454, 40585, 45361, 45362, 363601}.

%D Jean-Marie De Koninck, Armel Mercier, 1001 problemes en theorie classique des nombres - Entry 258, p. 41. Ellipses, 2004.

%e a(0) = 1 because 0 -> 1;

%e a(1) = 0 because 1 -> 1;

%e a(2) = 0 because 2 -> 2;

%e a(4) = 7 because 4 -> 24 -> 26 -> 722 -> 5044 -> 169 -> 363601 -> 1454, with 7 iterations because 1454 -> 169;

%e a(40585) = 0 because 40585 -> 40585.

%p A061602 := proc(n) if n = 0 then 1; else add(d!,d=convert(n,base,10)) ; end if; end proc:

%p A173447 := proc(n) trck := [n] ; while true do m := A061602(op(-1,trck)) ; if m in trck then return nops(trck)-1 ; else trck := [op(trck),m] ; end if; end do: end proc:

%p seq(A173447(n),n=0..50) ;

%o (Magma) a061602:=func< n | n eq 0 select 1 else &+[ Factorial(d): d in Intseq(n) ] >;

%o a173447:=function(n); T:=[]; count:=0; a:=n; while a notin T do Append(~T, a); a:=a061602(a); count+:=1; end while; return count-1; end function; [ a173447(n): n in [0..60] ];

%Y Cf. A061602.

%K nonn,base

%O 0,4

%A _Michel Lagneau_, Nov 22 2010

%E Reduced to three lines of numbers; rephrased in terms of A061602; replaced program by a structured version - _R. J. Mathar_, Nov 23 2010

%E Terms, offset, and example corrected by _D. S. McNeil_, Nov 23 2010

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)