login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A171000 Irreducible Boolean polynomials written as binary vectors. 6

%I #21 Dec 29 2020 03:22:12

%S 1,10,11,101,1001,1011,1101,10001,10011,10111,11001,11101,100001,

%T 100011,100101,100111,101001,101011,110001,110101,111001,1000001,

%U 1000011,1000101,1000111,1001011,1001101,1001111,1010001,1010011,1010111,1011001,1011101,1100001

%N Irreducible Boolean polynomials written as binary vectors.

%C These are the polynomials enumerated in A169912, and written in base 10 in A067139.

%C 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

%H N. J. A. Sloane, <a href="/A171000/b171000.txt">Table of n, a(n) for n = 1..5655</a>

%H D. Applegate, M. LeBrun and N. J. A. Sloane, <a href="http://arxiv.org/abs/1107.1130">Dismal Arithmetic</a>, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]

%o (Python)

%o def addn(m1, m2):

%o s1, s2 = "{0:b}".format(m1), "{0:b}".format(m2)

%o len_max = max(len(s1), len(s2))

%o return int(''.join(max(i, j) for i, j in zip(s1.rjust(len_max, '0'), s2.rjust(len_max, '0'))))

%o def muln(m1, m2):

%o s1, s2, prod = "{0:b}".format(m1), "{0:b}".format(m2), '0'

%o for i in range(len(s2)):

%o k = s2[-i-1]

%o prod = addn(int(str(prod), 2), int(''.join(min(j, k) for j in s1), 2)*2**i)

%o return prod

%o L_p10, m = [1], 2

%o while m < 100:

%o ct = 0

%o for i in range(1, len(L_p10)):

%o p = L_p10[i]

%o for j in range(2, m):

%o jp = int(str(muln(j, p)), 2)

%o if jp > m: break

%o if jp == m: ct += 1; break

%o if ct > 0: break

%o if ct == 0: L_p10.append(m)

%o m += 1

%o L_p2 = []

%o for d in L_p10: L_p2.append("{0:b}".format(d))

%o print(*L_p2, sep =', ') # _Ya-Ping Lu_, Dec 27 2020

%Y Cf. A169912, A067139.

%Y Base 3 lunar primes: A130206, A170806.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Aug 31 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)