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.

A171000 Irreducible Boolean polynomials written as binary vectors.

Original entry on oeis.org

1, 10, 11, 101, 1001, 1011, 1101, 10001, 10011, 10111, 11001, 11101, 100001, 100011, 100101, 100111, 101001, 101011, 110001, 110101, 111001, 1000001, 1000011, 1000101, 1000111, 1001011, 1001101, 1001111, 1010001, 1010011, 1010111, 1011001, 1011101, 1100001
Offset: 1

Views

Author

N. J. A. Sloane, Aug 31 2010

Keywords

Comments

These are the polynomials enumerated in A169912, and written in base 10 in A067139.
This sequence consists of 1 and the lunar primes in base 2 arithmetic. To construct the lunar base 2 primes, start with 10, and repeatedly adjoin the next smallest binary number that is not a lunar base-2 multiple of any earlier number. - N. J. A. Sloane, Jan 26 2011

Crossrefs

Base 3 lunar primes: A130206, A170806.

Programs

  • Python
    def addn(m1, m2):
        s1, s2 = "{0:b}".format(m1), "{0:b}".format(m2)
        len_max = max(len(s1), len(s2))
        return int(''.join(max(i, j) for i, j in zip(s1.rjust(len_max, '0'), s2.rjust(len_max, '0'))))
    def muln(m1, m2):
        s1, s2, prod =  "{0:b}".format(m1), "{0:b}".format(m2), '0'
        for i in range(len(s2)):
            k = s2[-i-1]
            prod = addn(int(str(prod), 2), int(''.join(min(j, k) for j in s1), 2)*2**i)
        return prod
    L_p10, m = [1], 2
    while m < 100:
        ct = 0
        for i in range(1, len(L_p10)):
            p = L_p10[i]
            for j in range(2, m):
                jp = int(str(muln(j, p)), 2)
                if jp > m: break
                if jp == m: ct += 1; break
            if ct > 0: break
        if ct == 0: L_p10.append(m)
        m += 1
    L_p2 = []
    for d in L_p10: L_p2.append("{0:b}".format(d))
    print(*L_p2, sep =', ') # Ya-Ping Lu, Dec 27 2020