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!)
A308725 Number of steps to reach 6 or 7 when iterating x -> A227215(x) starting at x=n, where A227215(n) gives the smallest such sum a+b+c of three positive integers for which a*b*c = n. 1
3, 3, 2, 2, 1, 0, 0, 1, 1, 2, 4, 1, 3, 3, 2, 2, 7, 2, 6, 2, 5, 4, 6, 2, 5, 3, 2, 5, 5, 3, 4, 3, 3, 3, 4, 3, 9, 5, 8, 5, 7, 2, 6, 3, 5, 4, 4, 5, 3, 2, 6, 8, 9, 2, 8, 4, 7, 4, 6, 2, 5, 4, 4, 2, 7, 3, 4, 6, 3, 4, 6, 4, 5, 6, 4, 7, 7, 3, 4, 4, 3, 4, 8, 4, 7, 5, 4, 8, 7, 4, 6, 3, 5, 3, 6, 4, 9, 3, 8, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Starting from n, choose factorization n = m1*m2*m3 so that the sum x = m1+m2+m3 is minimal, then set n = x and repeat. a(n) gives the number of steps needed to reach either 6 or 7. The process is guaranteed to reach either term, because we only use factorization n = n*1*1 when n is either 1 or a prime number, that are the only cases (apart from A227215(4)=5) for which A227215(n) > n as then A227215(n) = n+2. Moreover, for n > 3, at least one of n, n+2, n+4 is composite, leading to a further significant drop in the trajectory after at most two consecutive +2 steps. - Comment clarified by Antti Karttunen, Jul 12 2019
Records: 3, 4, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, ..., occur at: n = 1, 11, 17, 37, 107, 233, 307, 1289, 3986, 6637, 14347, 69029, .... - Antti Karttunen, Jul 12 2019
LINKS
FORMULA
If n is 6 or 7, a(n) = 0, otherwise a(n) = 1 + a(A227215(n)). - Antti Karttunen, Jul 11 2019
EXAMPLE
1 = 1*1*1 --> 1 + 1 + 1 = 3
3 = 1*1*3 --> 1 + 1 + 3 = 5
5 = 1*1*5 --> 1 + 1 + 5 = 7, thus a(1) = 3.
.
4 = 1*2*2 --> 1 + 2 + 2 = 5,
5 = 1*1*5 --> 1 + 1 + 5 = 7, thus a(4) = 2.
.
560 = 7*8*10 --> 7 + 8 + 10 = 25
25 = 1*5*5 --> 1 + 5 + 5 = 11
11 = 1*1*11 --> 1 + 1 + 11 = 13
13 = 1*1*13 --> 1 + 1 + 13 = 15
15 = 1*3*5 --> 1 + 3 + 5 = 9
9 = 1*3*3 --> 3 + 3 + 1 = 7, thus a(560) = 6.
.
84 = 3*4*7 --> 3 + 4 + 7 = 14
14 = 1*2*7 --> 1 + 2 + 7 = 10
10 = 1*2*5 --> 1 + 2 + 5 = 8
8 = 2*2*2 --> 2 + 2 + 2 = 6, thus a(84) = 4.
MATHEMATICA
maxTerm = 99 (* Should be increased if output -1 appears. *);
f[m_] := Module[{m1, m2, m3, factors}, factors = {m1, m2, m3} /. {ToRules[ Reduce[1 <= m1 <= m2 <= m3 && m == m1 m2 m3, {m1, m2, m3}, Integers]]}; SortBy[factors, Total] // First];
a[n_] := Module[{cnt = 0, m = n, fm, step}, While[!(m == 6 || m == 7), step = {fm = f[m], m = Total[fm]}; (* Print[n, " ", step]; *) cnt++; If[cnt > maxTerm, Return[-1]]]; cnt];
Array[a, 100] (* Jean-François Alcover, Jul 03 2019 *)
PROG
(PARI)
A227215(n) = { my(ms=3*n); fordiv(n, i, for(j=i, (n/i), if(!(n%j), for(k=j, n/(i*j), if(i*j*k==n, ms = min(ms, (i+j+k))))))); (ms); }; \\ Like code in A227215.
A308725(n) = if((6==n)||(7==n), 0, 1+A308725(A227215(n)));
\\ Memoized implementation:
memoA308725 = Map();
A308725(n) = if((6==n)||(7==n), 0, my(v); if(mapisdefined(memoA308725, n, &v), v, v = 1+A308725(A227215(n)); mapput(memoA308725, n, v); (v))); \\ Antti Karttunen, Jul 12 2019
CROSSREFS
Sequence in context: A131589 A338113 A309119 * A202691 A328143 A278402
KEYWORD
nonn
AUTHOR
Ali Sada, Jun 20 2019
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 17:00 EDT 2024. Contains 372738 sequences. (Running on oeis4.)