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-10 of 44 results. Next

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

A369110 a(n) is the number of distinct elements appearing in the sequence formed by recursively applying A063655 when starting from n.

Original entry on oeis.org

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

Views

Author

Adnan Baysal, Jan 13 2024

Keywords

Comments

A063655(n) gives the smallest semiperimeter of an integral rectangle with area n, which is the same thing as the minimum sum of two positive integers whose product is n. In this sequence, A063655 is applied recursively until a cycle is found. Then the number of distinct elements appearing in this process is given as a(n). Note that it's conjectured that a cycle will be found at some point.
Conjecture: The cycle part of each sequence generated by the recursion is one of (4), (5, 6), or (6, 5). Confirmed through 1 millionth term.
The conjecture is true. Proof: The conjecture holds for n <= 6. Suppose n >= 7 and the conjecture holds for lower values of n. If n is composite, then A063655(n) <= n/2+2. If n is prime, then A063655(n) = n+1 is even and A063655(A063655(n)) <= (n+1)/2+2. In both cases, n reaches a lower number and the conjecture holds for n. - Jason Yuen, Mar 30 2024

Examples

			n = 1 can be factored as 1*1 with minimum sum 2 (similarly, A063655(1) = 2). Then 2 = 1*2, so minimum sum is 3 = A063655(2). 3 = 1*3 which means the next number in the recursion is 4 = A063655(3). 4 = 2*2 which gives the same number 4 = A063655(4), hence this recursion will create a cycle at this point. Starting from n = 1 (including 1), we generated these numbers: (1, 2, 3, 4, 4, 4, ...). Therefore, a(1) = 4. a(2), a(3), and a(4) are trivially deduced from this example.
		

Crossrefs

Programs

  • Python
    from sympy import divisors
    def A369110(n):
        c = {n}
        while n<4 or n>5:
            c.add(n:=(d:=divisors(n))[((l:=len(d))-1)>>1]+d[l>>1])
        if n==5:
            c.add(6)
        return len(c) # Chai Wah Wu, Apr 25 2024

A092510 Difference between smallest semiperimeter (see A063655) and its integer log (see A001414).

Original entry on oeis.org

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

Views

Author

Carlos Alves, Dec 31 2004

Keywords

Examples

			If p is prime a(p)=1 because A063655(p) = p+1 and A001414(p) = p.
		

Crossrefs

Cf. A063655 and A001414.

Programs

Formula

a(n) = A063655(n) - A001414(n).

Extensions

Offset corrected and missing term a(1) = 2 prepended by Antti Karttunen, Oct 20 2017

A369793 a(n) is the number of occurrences of n in A063655.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 3, 3, 3, 2, 5, 3, 5, 5, 5, 4, 5, 5, 7, 6, 7, 5, 8, 6, 7, 7, 7, 6, 10, 7, 9, 8, 9, 9, 10, 8, 10, 9, 11, 8, 13, 9, 13, 11, 12, 11, 14, 13, 11, 12, 15, 10, 15, 13, 15, 13, 14, 12, 15, 12, 18, 16, 15, 15, 17, 13, 17
Offset: 1

Views

Author

Adnan Baysal, Feb 07 2024

Keywords

Comments

Construct a directed graph whose vertex set is the set of all positive integers, and a directed edge from k to n belongs to this graph iff A063655(k) = n. a(n) is the in-degree of the vertex n in this graph. As conjectured in A369110, it is also conjectured here that the only cycles in this graph are from 4 to itself and between 5 and 6.

Examples

			a(1) = 0 since 1 does not exist in A063655. This is also clear from the definition of A063655, because there is no integral rectangle with semiperimeter 1.
a(2) = 1 because there is only one integral rectangle of area 1 with a minimal semiperimeter 2, which is the 1 X 1 square. So 2 appears only once in A063655, which means a(2) = 1.
a(4) = 2, because only A063655(3) and A063655(4) have the value 4. For any n > 4, A063655(n) > 4, because A063655(n) > 2 * sqrt(n) > 2 * sqrt(4) = 4. Hence, 4 cannot appear in the rest of A063655.
		

Crossrefs

Programs

  • Mathematica
    a=1156;Table[Count[Table[2*Median[Divisors[m]], {m,a}] ,n],{n,Floor[2*Sqrt[a]]}] (* James C. McMahon, Mar 12 2024 *)
  • Python
    from sympy import divisors
    def A369793(n): return sum(1 for m in range(1,(n**2>>2)+1) if (d:=divisors(m))[((l:=len(d))-1)>>1]+d[l>>1]==n) # Chai Wah Wu, Mar 25 2024

A371597 a(n) is the sum of k where A063655(k) = n.

Original entry on oeis.org

0, 1, 2, 7, 6, 22, 22, 38, 52, 70, 58, 141, 104, 188, 230, 281, 260, 320, 374, 531, 526, 717, 566, 927, 756, 1017, 1114, 1203, 1148, 1799, 1402, 1741, 1718, 2170, 2314, 2765, 2400, 2912, 2800, 3769, 2856, 4577, 3352, 4923, 4410, 5054, 5036, 6346, 6246, 5537
Offset: 1

Views

Author

Adnan Baysal, Mar 28 2024

Keywords

Comments

Construct the same directed graph as in A369793. a(n) is the sum of vertices directed to the vertex n in this graph.

Examples

			a(1) = 0 since 1 does not exist in A063655.
a(2) = 1 because there is only one integral rectangle of area 1 with a minimal semiperimeter 2, which is the 1 X 1 square. So 2 appears only once in A063655 at index 1, which means a(2) = 1.
a(4) = 7, because only A063655(3) and A063655(4) have the value 4. For any n > 4, A063655(n) > 4, because A063655(n) > 2 * sqrt(n) > 2 * sqrt(4) = 4. Hence, 4 cannot appear in the rest of A063655.
		

Crossrefs

Programs

  • Python
    from sympy import divisors
    def A371597(n): return sum(m for m in range(1, (n**2>>2)+1) if (d:=divisors(m))[((l:=len(d))-1)>>1]+d[l>>1]==n)

A385812 Numbers k such that A063655(k) > A063655(k+1).

Original entry on oeis.org

5, 7, 11, 13, 14, 17, 19, 23, 26, 27, 29, 31, 34, 37, 38, 39, 41, 43, 44, 47, 51, 53, 55, 59, 61, 62, 65, 67, 69, 71, 73, 74, 76, 79, 83, 86, 87, 89, 94, 95, 97, 98, 101, 103, 107, 109, 111, 113, 116, 118, 119, 122, 123, 124, 125, 127, 129, 131, 134, 137, 139, 142, 146, 149
Offset: 1

Views

Author

Richard S. Chang, Jul 09 2025

Keywords

Comments

Lai and Reinfeld show that:
Terms include all primes greater than 3.
Terms include 2p where p is prime and 2p+1 is composite.
a(n) + 1 is never a perfect square.
Let b be a real number greater than 1 and let P(n) be the probability of getting n as the product of two independent die rolls where each die comes up k with probability (b-1)/b^k. A number is a term if and only if P(n)
Lai and Reinfeld conjecture that:
Asymptotically half the positive integers are terms.
For any positive integer L, there exist L consecutive numbers in this sequence.
Also, a(n) is never a perfect square.

Examples

			A063655(14) = 9 and A063655(15) = 8, so 14 is a term.
A063655(50) = 15 and A063655(51) = 20, so 50 is not a term.
		

Crossrefs

Cf. A063655.

Programs

  • Maple
    Res:= NULL: count:= 0:
    v:= A063655(1):
    for i from 2 while count < 100 do
      w:= A063655(i);
      if w < v then Res:= Res,i-1; count:= count+1 fi;
      v:= w
    od:
    Res; # Robert Israel, Aug 10 2025
  • Mathematica
    Position[Differences[Array[2*Median[Divisors[#]] &, 150]], ?Negative] // Flatten (* _Amiram Eldar, Jul 10 2025 *)
  • PARI
    s(n) = my(md=if(n<2, 1, my(d=divisors(n)); d[(length(d)+1)\2])); md + n/md; \\A063655
    isok(k) = s(k) > s(k+1); \\ Michel Marcus, Jul 09 2025

Extensions

More terms from Michel Marcus, Jul 09 2025

A100546 Difference between the smallest semiperimeter (see A063655) and its integer log (A001414) equals 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 18, 19, 23, 24, 29, 30, 31, 37, 41, 42, 43, 47, 53, 59, 61, 66, 67, 71, 73, 78, 79, 83, 89, 97, 101, 102, 103, 107, 109, 113, 114, 127, 131, 137, 138, 139, 149, 151, 157, 163, 167, 173, 174, 179, 181, 186, 191, 193, 197, 199, 211, 222, 223, 227
Offset: 0

Author

Carlos Alves, Dec 31 2004

Keywords

Comments

Theorem: Except for 24, the sequence is the union of primes and 6*primes.

Examples

			Any prime p, since it has semiperimeter p+1 and its integer log is p.
		

Crossrefs

Cf. A001414 and A063655.

Programs

  • Mathematica
    logint = Function[n, Module[{vn}, vn = Transpose[FactorInteger[n]];vn[[1]].vn[[2]] ]]; semiperi = Function[n, Min[Divisors[n] + Reverse[Divisors[n]]]]; sq = {}; Do[If[semiperi[k] == logint[k] + 1, AppendTo[sq, k]], {k, 2, 500}]; sq

A107324 Floor(A063655(n)/2).

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 3, 3, 3, 6, 3, 7, 4, 4, 4, 9, 4, 10, 4, 5, 6, 12, 5, 5, 7, 6, 5, 15, 5, 16, 6, 7, 9, 6, 6, 19, 10, 8, 6, 21, 6, 22, 7, 7, 12, 24, 7, 7, 7, 10, 8, 27, 7, 8, 7, 11, 15, 30, 8, 31, 16, 8, 8, 9, 8, 34, 10, 13, 8, 36, 8, 37, 19, 10, 11, 9, 9, 40, 9, 9, 21, 42, 9, 11, 22, 16, 9, 45, 9
Offset: 1

Author

Leroy Quet, May 21 2005

Keywords

Comments

a(n) is average (rounded down) of middle divisor(s) of n.

Extensions

More terms from David Wasserman, May 06 2008

A107325 a(n) = ceiling(A063655(n)/2).

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 4, 3, 3, 4, 6, 4, 7, 5, 4, 4, 9, 5, 10, 5, 5, 7, 12, 5, 5, 8, 6, 6, 15, 6, 16, 6, 7, 10, 6, 6, 19, 11, 8, 7, 21, 7, 22, 8, 7, 13, 24, 7, 7, 8, 10, 9, 27, 8, 8, 8, 11, 16, 30, 8, 31, 17, 8, 8, 9, 9, 34, 11, 13, 9, 36, 9, 37, 20, 10, 12, 9, 10, 40, 9, 9, 22, 42, 10, 11, 23, 16
Offset: 1

Author

Leroy Quet, May 21 2005

Keywords

Comments

a(n) is average (rounded up) of middle divisor(s) of n.

Programs

  • Mathematica
    Do[l = Divisors[n]; k = Length[l]; If[EvenQ[k], m = (l[[k/2]] + l[[k/2 + 1]])/2, m = l[[(k+1)/2]]]; Print[Ceiling[m]], {n, 1, 100}] (* Ryan Propper, Sep 17 2005 *)

Extensions

More terms from Ryan Propper, Sep 17 2005

A386525 a(n) is the least k such that at least n terms of A063655 starting from index k are strictly decreasing.

Original entry on oeis.org

1, 5, 13, 37, 122, 3004, 26283, 53411, 109453, 4117156, 16831081
Offset: 1

Author

Richard S. Chang, Jul 24 2025

Keywords

Comments

Lai and Reinfeld conjecture that the sequence is infinite.

Examples

			The first 40 values of A063655 are: 2, 3, 4, 4, 6, 5, 8, 6, 6, 7, 12, 7, 14, 9, 8, 8, 18, 9, 20, 9, 10, 13, 24, 10, 10, 15, 12, 11, 30, 11, 32, 12, 14, 19, 12, 12, 38, 21, 16, and 13. Because the 37th term is the first of 4 strictly decreasing values and there is not previous occurrence of four decreasing values, a(3) = 37.
		

Crossrefs

Cf. A063655.

Extensions

a(11) from Sean A. Irvine, Aug 10 2025
Showing 1-10 of 44 results. Next