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.

Previous Showing 11-20 of 21 results. Next

A143192 a(n) is the smallest natural number we cannot obtain from n, n+1, n+2, n+3, n+4, n+5, n+6, n+7 and the operators +, -, *, /, using each number only once.

Original entry on oeis.org

1413, 7187, 12421, 22751, 28862, 48046, 36094, 46372, 54214, 72845, 88119, 107246, 125589, 104153, 43838, 45893, 55054, 62090, 66226, 70187, 69638, 74941, 85303, 81913, 68891, 77237, 37997, 48758, 42827, 45554, 22217, 26617, 29422, 29099
Offset: 0

Views

Author

Gilles A.Fleury, Oct 18 2008, Mar 06 2009

Keywords

Comments

This sequence is related to the sequences A071110 (for 5 successive integers) and A060316 (for 6 successive integers) and others sequences to come...
Asymptotically the sequence tends to 67 (the first n for which a(n)=67 is n=1042).

Crossrefs

A143193 a(n) is the smallest natural number we cannot obtain from n, n+1, n+2, n+3, n+4, n+5, n+6, n+7, n+8 and the operators +, -, *, /, using each number only once.

Original entry on oeis.org

7187, 38103, 54251, 114358, 168673, 264111, 319699, 456061, 588847, 812092, 1005321, 1222630, 445059, 499063, 600907, 706847, 820609, 929113, 1048137, 1269847, 1049291, 1113439, 1252843, 1411942, 1588841, 456206, 462382, 464357, 479894
Offset: 1

Views

Author

Gilles A.Fleury, Oct 18 2008

Keywords

Comments

This sequence is related to the sequences A071110 (for 5 successive integers) and A060316 (for 6 successive integers).
What is the asymptotic value of this sequence? What is the first n for which a(n) equals the asymptotic value?

Crossrefs

A354423 a(0)=1; a(n) is the smallest positive integer that cannot be obtained from the integers {1, ..., n} using each number at most once, and the operators addition and multiplication.

Original entry on oeis.org

1, 2, 4, 10, 22, 58, 233, 827, 3359, 16631, 114371, 708278, 3975838, 35724478
Offset: 0

Views

Author

Dean D. Ballard, May 26 2022

Keywords

Comments

This is a simpler version of A060315, which uses all four arithmetic operations: addition, subtraction, multiplication, and division. The sequence is the answer to FiveThirtyEight.com's Riddler Express of June 3, 2022 (see links).

Examples

			a(3)=10 because 1=1, 2=2, 3=3, 4=1+3, 5=2+3, 6=2*3, 7=2*3+1, 8=(3+1)*2, 9=(1+2)*3, but there is no way to make 10 using 1, 2, and 3 at most once.
		

Crossrefs

Cf. A060315.

Programs

  • Python
    def a(n):
        R = dict()  # R[|s|-1][s] = reachable values using subset s
        for i in range(n+1): R[i] = dict()
        for i in range(1, n+1): R[0][(i,)] = {i}
        reach = set(range(1, n+1))
        for j in range(1, n):
            for i in range((j+1)//2):
                for s in R[i]:
                    for t in R[j-1-i]:
                        if set(s) & set(t) == set():
                            u = tuple(sorted(set(s) | set(t)))
                            if u not in R[len(u)-1]:
                                R[len(u)-1][u] = set()
                            for a in R[i][s]:
                                for b in R[j-1-i][t]:
                                    R[len(u)-1][u].update([a+b, a*b])
                                    reach.update([a+b, a*b])
        k = n+1
        while k in reach: k += 1
        return k
    print([a(n) for n in range(10)]) # Michael S. Branicky, May 30 2022

Formula

a(n) <= A060315(n+1). - Michael S. Branicky, Jun 04 2022

Extensions

a(10)-a(12) from Michael S. Branicky, May 27 2022
a(13) from Michael S. Branicky, May 30 2022
a(0) inserted by Michael S. Branicky, Jun 04 2022

A071313 a(n) is the smallest number that cannot be obtained from the numbers {1,3,...,2*n-1} using each number at most once and the operators +, -, *, /, where intermediate subexpressions must be integers.

Original entry on oeis.org

2, 5, 11, 41, 92, 733, 4337, 28972, 195098, 1797746
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 11 2002

Keywords

Comments

If noninteger subexpressions are permitted, a(5) = 122 and not 92 since 92 = (3+7)*(9 + 1/5). - Michael S. Branicky, Jul 01 2022

Examples

			a(2)=5 because using {1,3} and the four operations we can obtain 1=1, 3-1=2, 3=3, 3+1=4 but we cannot obtain 5 in the same way.
		

Crossrefs

Programs

  • Python
    def a(n):
        R = dict() # index of each reachable subset is [card(s)-1][s]
        for i in range(n): R[i] = dict()
        for i in range(1, n+1): R[0][(2*i-1,)] = {2*i-1}
        reach = set(range(1, 2*n, 2))
        for j in range(1, n):
            for i in range((j+1)//2):
                for s1 in R[i]:
                    for s2 in R[j-1-i]:
                        if set(s1) & set(s2) == set():
                            s12 = tuple(sorted(set(s1) | set(s2)))
                            if s12 not in R[len(s12)-1]:
                                R[len(s12)-1][s12] = set()
                            for a in R[i][s1]:
                                for b in R[j-1-i][s2]:
                                    allowed = [a+b, a*b, a-b, b-a]
                                    if a!=0 and b%a==0: allowed.append(b//a)
                                    if b!=0 and a%b==0: allowed.append(a//b)
                                    R[len(s12)-1][s12].update(allowed)
                                    reach.update(allowed)
        k = 1
        while k in reach: k += 1
        return k
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Jul 01 2022

Extensions

a(10) from Michael S. Branicky, Jul 01 2022

A071603 Number of different positive integers that we can obtain from the integers {1,2,...,n} using each number at most once and the operators +, -, *, /, where intermediate subexpressions must be integers.

Original entry on oeis.org

1, 3, 9, 31, 121, 542, 2868, 16329, 106762, 758155, 6142570
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 02 2002

Keywords

Examples

			a(4)=31 because we can obtain the positive integers 1,2,...,28 and 30,32,36 by using the integers {1, 2, 3, 4} at most once and the four operations. For example 30 = 3*2*(4+1).
		

Crossrefs

Programs

  • Python
    def a(n):
        R = dict() # index of each reachable subset is [card(s)-1][s]
        for i in range(n): R[i] = dict()
        for i in range(1, n+1): R[0][(i,)] = {i}
        reach = set(range(1, n+1))
        for j in range(1, n):
            for i in range((j+1)//2):
                for s1 in R[i]:
                    for s2 in R[j-1-i]:
                        if set(s1) & set(s2) == set():
                            s12 = tuple(sorted(set(s1) | set(s2)))
                            if s12 not in R[len(s12)-1]:
                                R[len(s12)-1][s12] = set()
                            for a in R[i][s1]:
                                for b in R[j-1-i][s2]:
                                    allowed = [a+b, a*b, a-b, b-a]
                                    if a!=0 and b%a==0: allowed.append(b//a)
                                    if b!=0 and a%b==0: allowed.append(a//b)
                                    R[len(s12)-1][s12].update(allowed)
                                    reach.update(allowed)
        return len(set(r for r in reach if r > 0 and r.denominator == 1))
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Jul 01 2022

Extensions

a(10)-a(11) from Michael S. Branicky, Jul 01 2022

A071794 a(n) is the smallest integer > 0 that cannot be obtained from the integers {1, ..., n} using each number at most once and the operators +, -, *, /, ^.

Original entry on oeis.org

2, 4, 11, 34, 178, 926, 9434
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 06 2002

Keywords

Comments

The old entry a(6) = 791 was incorrect since 791 = (2^5 + 3^4) (1+6). - Bruce Torrence (btorrenc(AT)rmc.edu), Feb 14 2007. Also 791 = ((3*5)^4-1)/2^6. - Sam Handler (shandler(AT)macalester.edu) and Kurt Bachtold (kbachtold(AT)route24.net), Feb 28 2007.
I believe that a(7) = 9434 (with approximately 98% certainty). - Bruce Torrence (btorrenc(AT)rmc.edu), Feb 14 2007
Using the Java programming language, my brother and I have independently created 2 programs which absolutely solve this problem for a given index via brute force algorithms. Our process is to systematically generate every possible equation in polish notation, solve it, then add its solution (providing that it is a positive integer) to a list of previous solutions. After all solutions have been calculated, the program references the list to find the lowest missing number. - Michael and David Kent (zdz.ruai(AT)gmail.com), Jul 29 2007

Examples

			a(3)=11 because using {1,2,3} we can write 1, 2, 3, 3+1=4, 3+2=5, 3*2=6, 3*2+1=7, 2^3=8, 3^2=9, (3^2)+1=10 but we cannot obtain 11 in the same way.
		

References

  • B. Torrence, Arithmetic Combinations, Mathematica in Education and Research, Vol. 12, No. 1 (2007), pp. 47-59.

Crossrefs

Cf. A060315.

Programs

  • Mathematica
    The Torrence article gives a description of how one can use Mathematica to investigate the sequence.

Extensions

a(6) corrected by Bruce Torrence (btorrenc(AT)rmc.edu), Feb 14 2007
a(7) from Michael and David Kent (zdz.ruai(AT)gmail.com), Jul 29 2007

A071819 a(n) is the difference between the two smallest positive integers that you cannot obtain using the integers {1,2,...,n} at most once and the four operators +, -, *, /.

Original entry on oeis.org

1, 1, 1, 2, 3, 23, 5, 144, 98, 658
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 07 2002

Keywords

Examples

			a(4)=2 because 29 and 31 are the smallest numbers that you cannot obtain using {1,2,3,4} and the four operations and 31-29 = 2.
		

Crossrefs

Cf. A060315.

A071905 a(n) is the smallest positive integer (which is a polynomial of degree 0) that cannot be obtained using the polynomials {x, x+1, ..., x+n} using each polynomial at most once and the operations +, -, *, /.

Original entry on oeis.org

1, 2, 3, 5, 7, 13, 29, 67, 103, 373
Offset: 0

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 13 2002

Keywords

Examples

			a(3)=5 because using {x, x+1, x+2, x+3} we can get x+1-x=1, x+2-x=2, x+3-x=3, (x+2-x)*(x+3-(x+1))=4 but we cannot obtain 5 in the same way.
		

Crossrefs

A071985 a(n) is the smallest positive integer that cannot be obtained using at most n-1 of the integers {1, 2, ..., n} using each number at most once and the operators +, -, *, /.

Original entry on oeis.org

1, 3, 7, 17, 47, 158, 681, 3209, 17989, 104289, 635867
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 17 2002

Keywords

Comments

For all n>=2, A060315(n+1) > a(n) > A060315(n).

Examples

			a(3)=7 because using two of the numbers {1,2,3} with the four operations we can obtain 1=1, 2=2, 3=3, 3+1=4, 3+2=5, 3*2=6 but we cannot obtain 7 in the same way.
		

Crossrefs

Cf. A060315.

Programs

  • Python
    def a(n):
        R = dict() # index of each reachable subset is [card(s)-1][s]
        for i in range(n): R[i] = dict()
        for i in range(1, n+1): R[0][(i,)] = {i}
        reach = set(i for i in range(1, n+1)) if n > 1 else set()
        for j in range(1, n-1):
            for i in range((j+1)//2):
                for s1 in R[i]:
                    for s2 in R[j-1-i]:
                        if set(s1) & set(s2) == set():
                            s12 = tuple(sorted(set(s1) | set(s2)))
                            if s12 not in R[len(s12)-1]:
                                R[len(s12)-1][s12] = set()
                            for a in R[i][s1]:
                                for b in R[j-1-i][s2]:
                                    allowed = [a+b, a*b, a-b, b-a]
                                    if a!=0 and b%a==0: allowed.append(b//a)
                                    if b!=0 and a%b==0: allowed.append(a//b)
                                    R[len(s12)-1][s12].update(allowed)
                                    reach.update(allowed)
        k = 1
        while k in reach: k += 1
        return k
    print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Jul 29 2022

Extensions

a(11) from Michael S. Branicky, Jul 29 2022

A143190 a(n) is the smallest natural number we cannot obtain from n, n+1, n+2, n+3 and the operators +, -, *, /, using each number only once.

Original entry on oeis.org

10, 29, 41, 43, 40, 44, 26, 21, 15, 15, 18, 18, 18, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Gilles A.Fleury, Oct 18 2008

Keywords

Comments

This sequence is related to the sequences A071110 (for 5 successive integers) and A060316 (for 6 successive integers) and others sequences to come...
Asymptotically (in fact as soon as n>=15), the sequence tends to 5.

Crossrefs

Previous Showing 11-20 of 21 results. Next