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-4 of 4 results.

A228287 Smallest value of z in the minimal value of x + y*z, given x*y + z = n (where x, y, z are positive integers).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 2, 3, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1
Offset: 2

Views

Author

Andy Niedermaier, Aug 19 2013

Keywords

Comments

If there are multiple triples (x, y, z) for which xy + z = n and x + yz is minimized, consider the triple with smallest z. I.e., this sequence illustrates the smallest z needed to minimize x + y*z.

Examples

			For n = 215 the triples (53, 4, 3) and (35, 6, 5) both give the minimal value of x + yz = 65. Thus a(215) = 3.
		

Crossrefs

Cf. A228286.

Programs

  • Maple
    A228287 := proc(n)
        local a,x,y,z,zfin ;
        a := n+n^2 ;
        zfin := n ;
        for z from 1 to n-1 do
            for x in numtheory[divisors](n-z) do
                y := (n-z)/x ;
                if x+y*z < a then
                    a := x+y*z ;
                    zfin := z ;
                end if;
            end do:
        end do:
        return zfin;
    end proc: # R. J. Mathar, Sep 02 2013
  • Mathematica
    A228287[n_] := Module[{a, x, y, z, zfin}, a = n + n^2; zfin = n; Do[Do[y = (n-z)/x; If[x + y*z < a, a = x + y*z; zfin = z], {x, Divisors[n-z]}], {z, 1, n-1}]; zfin];
    Table[A228287[n], {n, 2, 100}] (* Jean-François Alcover, Aug 08 2023, after R. J. Mathar *)

A338885 Irregular triangle read by rows in which the n-th row lists all numbers k such that there exists a diagonal lattice rectangle touching all four sides of an n X k rectangle.

Original entry on oeis.org

2, 3, 4, 5, 4, 5, 7, 6, 9, 10, 5, 7, 8, 11, 13, 7, 8, 10, 13, 16, 17, 6, 9, 11, 12, 15, 19, 21, 6, 8, 10, 11, 14, 17, 22, 25, 26, 7, 9, 10, 11, 13, 14, 16, 17, 19, 25, 29, 31, 9, 12, 13, 15, 18, 20, 21, 28, 33, 36, 37, 7, 8, 11, 12, 13, 14, 15, 17, 20, 22, 23
Offset: 2

Views

Author

Peter Kagey, Nov 14 2020

Keywords

Comments

A diagonal lattice rectangle is a rectangle with integer coordinates and no side parallel to the x-axis.
Conjecture: The smallest number in the n-th row is A228286(n).
Conjecture: The largest number in the n-th row is A033638(n).

Examples

			Table begins:
   n | n-th row
-----+------------------------------------------------
   2 | 2
   3 | 3
   4 | 4,  5
   5 | 4,  5,  7
   6 | 6,  9, 10
   7 | 5,  7,  8, 11, 13
   8 | 7,  8, 10, 13, 16, 17
   9 | 6,  9, 11, 12, 15, 19, 21
  10 | 6,  8, 10, 11, 14, 17, 22, 25, 26
  11 | 7,  9, 10, 11, 13, 14, 16, 17, 19, 25, 29, 31
  12 | 9, 12, 13, 15, 18, 20, 21, 28, 33, 36, 37
For n = 6, three of the diagonal lattice rectangles that touch the y-axis, x-axis, and line x = 6 are:
(2 ,6), (0,2), (4,0), (6,4);
(2, 9), (0,8), (4,0), (6,1); and
(3,10), (0,9), (3,0), (6,1);
which have maximum y-values of 6, 9, and 10 respectively.
		

Crossrefs

Cf. A338886 (row lengths).

A338887 a(n) is the size of the set {x + y*z | x*y + z = n}, where x, y, and z are positive integers.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 5, 6, 7, 9, 12, 10, 14, 15, 16, 19, 23, 19, 27, 24, 28, 30, 34, 30, 42, 38, 39, 39, 48, 42, 58, 50, 53, 56, 65, 51, 71, 67, 67, 68, 85, 68, 88, 76, 82, 85, 98, 76, 107, 95, 101, 94, 117, 96, 118, 108, 114, 121, 137, 100, 142, 131, 134, 130, 154
Offset: 1

Views

Author

Peter Kagey, Nov 14 2020

Keywords

Examples

			The a(7) = 5 solutions are:
2 + 3 * 1 =  5 (corresponding to 2 * 3 + 1 = 7),
1 + 6 * 1 =  7 (corresponding to 1 * 6 + 1 = 7),
2 + 2 * 3 =  8 (corresponding to 2 * 2 + 3 = 7),
1 + 5 * 2 = 11 (corresponding to 1 * 5 + 2 = 7), and
1 + 4 * 3 = 13 (corresponding to 1 * 4 + 3 = 7).
		

Crossrefs

Formula

a(n) <= A338886(n).

A228288 Smallest k such that z = n in the minimal value of x + y*z, given x*y + z = k (for positive integers x, y, z).

Original entry on oeis.org

2, 8, 48, 160, 720, 790, 1690, 4572, 13815, 22031, 22032, 79965, 209013, 546035, 546036, 546037, 2932793, 2037794, 2932795, 12433772, 17529248, 9945922, 72105623, 72105624, 72105625, 195099674, 205216242, 222426196, 222426197, 984126926
Offset: 1

Views

Author

Andy Niedermaier, Aug 19 2013

Keywords

Comments

The first decrease in the sequence is at a(17) > a(18). [Andy Niedermaier, Sep 01 2013]
No value of z larger than 25 appears in the first 10^8 terms of A228287.

Examples

			For n = 3, a(n) = 48. This is because for 2 <= n < 48, z = 1 or z = 2 in the smallest value of x + yz (given xy + z = n). But for xy + z = 48, the minimal x + yz is given for (x, y, z) = (15, 3, 3).
In cases where multiple triples (x, y, z) achieve the smallest value for x + yz, we consider the triple with the smaller value of z. (See A228287.) Thus, even though for n = 215, (53, 4, 3) and (35, 6, 5) give the minimum value for x + yz, a(5) cannot equal 215. (720 is the smallest n for which we MUST have z = 5 in order to achieve the minimum x + yz.)
		

Crossrefs

Formula

a(n) = min {k: A228287(k)=n}. Smallest greedy inverse of A228287. - R. J. Mathar, Sep 02 2013

Extensions

Added terms a(17) through a(25). - Andy Niedermaier, Sep 02 2013
Added terms a(26) through a(30). - Andy Niedermaier, Sep 11 2013
Showing 1-4 of 4 results.