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.

User: Peter Boothe

Peter Boothe's wiki page.

Peter Boothe has authored 2 sequences.

A185352 The "smallest countdown" numbers are the smallest positive integer that cannot be made using the numbers n through 1, in order, using the operations +, -, *, /, and parentheses.

Original entry on oeis.org

2, 4, 8, 17, 39, 92, 275, 922, 2894, 10843, 35944
Offset: 1

Author

Peter Boothe and Abraham Asfaw, Feb 08 2012

Keywords

Comments

Inspired by a now-lost blog post in which someone discussed a "new year's countdown" equation for 2012, e.g., 10 * (9 + ((8 * (((7 + (6 / (5 * 4))) * 3) + 2)) + 1)) = 2012. This sequence has been "verified" by two independently created programs.

Examples

			for n = 3, a(3) = 8, because 3*2+1=7, and 3*(2+1)=9, but there is no equation with 3,2,and 1 in order that equals 8. Note that if we allow the order to change, we can make 8, because 2*(3+1)=8, but reordering is not allowed.
		

Crossrefs

Related to A060315, which is the smallest number that cannot be made with the numbers 1 to n, in any order.

Programs

  • Python
    from fractions import Fraction
    def genAllTrees(l):
        if len(l) == 0:
            return
        elif len(l) == 1:
            yield l[0], str(l[0])
        else:
            for middle in range(len(l)):
                for lval, leqn in genAllTrees(l[:middle]):
                    for rval, reqn in genAllTrees(l[middle:]):
                        yield lval+rval, ("(" + leqn + " + " + reqn + ")")
                        yield lval-rval, ("(" + leqn + " - " + reqn + ")")
                        yield lval*rval, ("(" + leqn + " * " + reqn + ")")
                        if rval != Fraction(0):
                            yield lval/rval, ("(" + leqn + " / " + reqn + ")")
    def findSmallestIntNotPresent(n):
        vals = {}
        for val, eqn in genAllTrees([Fraction(i) for i in range(n, 0, -1)]):
            if val.denominator == 1:
                val = val.numerator
                if val not in vals:
                    vals[val] = eqn
        i = 1
        while i in vals:
            i += 1
        return i
    for i in range(1, 11):
        print(i, findSmallestIntNotPresent(i))

Extensions

a(10)-a(11) from Hiroaki Yamanouchi, Oct 04 2014

A113028 a(n) is the largest integer whose base n digits are all different that is divisible by each of its individual digits.

Original entry on oeis.org

1, 2, 54, 108, 152, 16200, 2042460, 4416720, 9867312, 2334364200, 421877610, 1779700673520, 4025593863720, 8605596007008, 1147797065081426760, 2851241701975626960, 6723295828605676320, 5463472083393768444000, 32677216797923569872, 29966837620559153371200
Offset: 2

Author

Peter Boothe, Jan 03 2006

Keywords

Comments

Note that this definition precludes the digit 0 appearing anywhere in the base n representation of the number.

Examples

			a(2) = 1 trivially because that is the only number in base 2 that does not contain 0.
a(4) = 54 because in base 4, 54 is 312_4. There is only one number containing different digits and no zeros higher than that, namely 321_4, but 321_4 is not divisible by 2.
		

References

  • "Enigma 1343: Digital Dividend", New Scientist, Jun 04 2005, p. 28.

Programs

  • Python
    # see link for a faster version
    from itertools import permutations
    def fromdigits(d, b):
        n = 0
        for di in d: n *= b; n += di
        return n
    def a(n):
        for digits in range(n-1, 0, -1):
            for p in permutations(range(n-1, 0, -1), r=digits):
                t = fromdigits(p, n)
                if all(t%di == 0 for di in p):
                    return t
    print([a(n) for n in range(2, 11)]) # Michael S. Branicky, Jan 17 2022

Extensions

a(11)-a(13) from Francis Carr (fcarr(AT)alum.mit.edu), Feb 08 2006
a(14) from Michael S. Branicky, Jan 17 2022
a(15)-a(17) from Michael S. Branicky, Jan 20 2022
a(18)-a(21) from Jes Wolfe, Apr 26 2024