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.

Showing 1-5 of 5 results.

A308191 a(n) = smallest m such that A308190(m) = n, or -1 if no such m exists.

Original entry on oeis.org

5, 6, 8, 7, 10, 16, 17, 30, 29, 54, 53, 102, 101, 198, 197, 390, 389, 774, 773, 1542, 3080, 3079, 6154, 12304, 24604, 36901, 73798, 147592, 295180, 295517, 591030, 1182056, 1574849, 3149694, 4728211, 6299383, 12598762, 25197520, 25197533, 50395062, 100790120, 100790119, 201580234, 403160464, 806320924, 1232145821, 2464291638
Offset: 0

Views

Author

N. J. A. Sloane, Jun 14 2019

Keywords

Comments

It seems plausible that m exists for all n >= 0.
From Chai Wah Wu, Jun 14 2019: (Start)
All terms are even or prime. If a(n+1) is even, then 2*a(n)-a(n+1) = 4. a(n+1) <= 2*(a(n)-2) and thus m exists for all n >= 0. The proof in the comments of A308193 is applicable for this sequence as well.
If a(n) is prime, then a(n-1) <= a(n) + 1. For the prime terms 7, 17, 29, 53, 101, 197, 389, 773, 3079, 100790119, a(n-1) = a(n) + 1.
(End)

Crossrefs

Extensions

a(24)-a(41) from Chai Wah Wu, Jun 14 2019
a(42)-a(44) from Chai Wah Wu, Jun 15 2019
a(45)-a(46) from Chai Wah Wu, Jun 16 2019

A308193 Indices of records in A308190.

Original entry on oeis.org

5, 6, 7, 10, 16, 17, 29, 53, 101, 197, 389, 773, 1542, 3079, 6154, 12304, 24604, 36901, 73798, 147592, 295180, 295517, 591030, 1182056, 1574849, 3149694, 4728211, 6299383, 12598762, 25197520, 25197533, 50395062, 100790119, 201580234, 403160464, 806320924, 1232145821, 2464291638
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 2019

Keywords

Comments

For terms a(1) through a(16), with one exception, 2*a(n) - a(n+1) is either 4 or 5. Does this pattern continue, and if so, why?
From Chai Wah Wu, Jun 14 2019: (Start)
The pattern does not continue. a(17) = 24604, a(18) = 36901.
Theorem:
1. All terms are even or prime.
2. If a(n+1) is even, then 2*a(n)-a(n+1) = 4.
3. a(n+1) <= 2*(a(n)-2).
Proof: If a(n+1) = x is even, then A111234(x) = 2+x/2 = y. If we assume that x >= 6, then y < x. Thus A308190(x) = A308190(y)+1, i.e., a(n) <= y. If a(n) < y, then A308190(2*(a(n)-2)) = A308190(a(n)) + 1.
Since a(n) is a record value, this means that the next record value is at most at 2*(a(n)-2), i.e., 2*(a(n)-2) < x = a(n+1), a contradiction.
Thus we have shown that if a(n+1) is even, then 2*a(n) = a(n+1)+4.
If a(n+1) = x is an odd composite with smallest prime factor p > 2, then A308190(x) = A308190(y)+1 where y = p+x/p. On the other hand, A308190(2*(y-2)) = A308190(y)+1. Since 2*(y-2) < x, this contradicts the fact that a(n+1) = x is a record value.
(End)

Crossrefs

Extensions

a(17)-a(36) from Chai Wah Wu, Jun 14 2019
a(37)-a(38) from Chai Wah Wu, Jun 16 2019

A308192 Record values in A308190.

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 2019

Keywords

Crossrefs

Extensions

a(17)-a(36) from Chai Wah Wu, Jun 14 2019
a(37)-a(38) from Chai Wah Wu, Jun 16 2019
a(39)-a(41) from Chai Wah Wu, Jun 17 2019
a(42)-a(45) from Chai Wah Wu, Jun 24 2019

A308194 Number of steps to reach 5 when iterating x -> A063655(x) starting at x=n.

Original entry on oeis.org

0, 1, 3, 2, 2, 4, 5, 4, 4, 3, 3, 3, 4, 3, 4, 3, 5, 5, 6, 5, 5, 4, 5, 6, 7, 6, 6, 5, 4, 5, 5, 5, 7, 6, 4, 5, 6, 5, 5, 4, 4, 6, 5, 4, 4, 4, 4, 5, 5, 4, 4, 4, 6, 7, 5, 4, 6, 5, 4, 4, 4, 5, 7, 6, 5, 5, 6, 5, 6, 5, 4, 7, 4, 5, 5, 4, 4, 6, 6, 5, 6, 5, 6, 5, 6, 5, 4, 6, 6, 5, 6, 4, 7, 6, 4, 4, 8, 7, 7, 6, 6, 5
Offset: 5

Views

Author

N. J. A. Sloane, Jun 14 2019

Keywords

Comments

It is easy to show that every number n >= 5 eventually reaches 5. This was conjectured by Ali Sada. For A111234 sends a composite n > 5 to a smaller number, and sends a prime > 5 to a smaller number in two steps. Furthermore no number >= 5 can reach a number less than 5. So all numbers >= 5 eventually reach 5.

References

Crossrefs

Programs

  • PARI
    b(n) = { my(c=1); fordiv(n, d, if((d*d)>=n, if((d*d)==n, return(2*d), return(c+d))); c=d); (0); } \\ after A063655
    a(n) = for (k=0, oo, if (n==5, return (k), n=b(n))) \\ Rémy Sigrist, Jun 14 2019
    
  • Python
    from sympy import divisors
    def A308194(n):
        c, x = 0, n
        while x != 5:
            d = divisors(x)
            l = len(d)
            x = d[(l-1)//2] + d[l//2]
            c += 1
        return c # Chai Wah Wu, Jun 14 2019

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Ali Sada, Jun 20 2019

Keywords

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

Examples

			    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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

If n is 6 or 7, a(n) = 0, otherwise a(n) = 1 + a(A227215(n)). - Antti Karttunen, Jul 11 2019
Showing 1-5 of 5 results.