The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A340594 a(n) is the number of iterations of A340592 starting from n, until 0, 1 or a prime is reached. 3
 0, 0, 1, 0, 1, 0, 2, 2, 1, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 3, 1, 0, 2, 1, 1, 3, 1, 0, 2, 0, 2, 2, 1, 2, 1, 0, 1, 1, 2, 0, 4, 0, 1, 2, 2, 0, 1, 2, 1, 1, 1, 0, 1, 3, 1, 2, 4, 0, 2, 0, 3, 2, 2, 5, 1, 0, 1, 1, 1, 0, 3, 0, 2, 4, 2, 2, 2, 0, 6, 2, 3, 0, 1, 1, 1, 2, 3, 0, 2, 3, 2, 2, 1, 2, 1, 0, 3, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,7 COMMENTS a(n) = 0 if n is prime. LINKS Robert Israel, Table of n, a(n) for n = 2..10000 FORMULA a(n) = A066247(n)*(1 + a(A340592(n))). EXAMPLE A340592(21) = 16, A340592(16) = 14, A340592(14) = 13 is prime, so a(21) = 3. MAPLE dcat:= proc(L) local i, x; x:= L[-1]; for i from nops(L)-1 to 1 by -1 do x:= 10^(1+ilog10(x))*L[i]+x od; x end proc: f:= proc(n) local F; F:= sort(ifactors(n)[2], (a, b) -> a[1] < b[1]); dcat(map(t -> t[1]\$t[2], F)) mod n; end proc: g:= proc(n) option remember; if isprime(n) then 0 else 1 + procname(f(n)) fi end proc: g(0):= 0: g(1):= 0: map(g, [\$1..1000]); CROSSREFS Cf. A066247, A340592, A340595. Sequence in context: A347687 A287331 A179769 * A361685 A227193 A287397 Adjacent sequences: A340591 A340592 A340593 * A340595 A340596 A340597 KEYWORD nonn AUTHOR J. M. Bergot and Robert Israel, Jan 13 2021 STATUS approved

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.

Last modified December 9 13:48 EST 2023. Contains 367691 sequences. (Running on oeis4.)