The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A175424 a(n) is the number of steps of iterations of {(((D_k^D_(k-1))^D_(k-2))^...)^D_1, where D_k is the k-th digit D of number r and k is the number of digits of number r in decimal expansion of r (A055642)} needed to reach a single-digit number starting at r = n, or a(n) = -1 if a single-digit number is never reached. 7

%I #16 Jan 20 2022 17:32:00

%S 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,-1,-1,3,3,2,1,1,1,

%T 4,3,-1,-1,3,3,3,1,1,2,2,3,3,3,2,2,2,1,1,2,3,2,4,3,2,3,2,1,1,3,3,2,3,

%U 3,3,3,2,1,1,4,3,3,3,3,3,2,3,1,1,3,2,3,2,3,2,2,2,1,1,3,3,3,3,2,2,2,2

%N a(n) is the number of steps of iterations of {(((D_k^D_(k-1))^D_(k-2))^...)^D_1, where D_k is the k-th digit D of number r and k is the number of digits of number r in decimal expansion of r (A055642)} needed to reach a single-digit number starting at r = n, or a(n) = -1 if a single-digit number is never reached.

%C Conjecture: max(a(n)) = 4.

%e For n = 33: a(33) = 4 because for the number 33 there are 4 steps of defined iteration: {3^3 = 27}, {7^2 = 49}, {9^4 = 6561}, {((1^6)^5)^6 = 1}.

%o (PARI) f(n) = if (n, my(d=digits(n), r=d[#d]); if (!vecmin(d), return(0)); forstep (k=#d-1, 1, -1, r = r^d[k];); r); \\ A175420

%o findpos(n, list) = {forstep (k=#list, 1, -1, if (list[k] == n, return (k));); return (0);}

%o a(n) = {my(list = List(n), nb = 0); while (n >= 10, n = f(n); my(k=findpos(n, list)); nb++; if (k, if (k==#list-1, if (list[k]<10, return (nb), return(-1)), return(-1));); listput(list, n);); return (nb);} \\ _Michel Marcus_, Jan 20 2022

%Y Cf. A175419, A175420, A175421, A175422, A175423, A175425, A175426, A175427.

%K sign,base

%O 0,25

%A _Jaroslav Krizek_, May 09 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 May 14 06:13 EDT 2024. Contains 372528 sequences. (Running on oeis4.)