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.

A080943 Numbers having exactly two divisors that are also suffixes in binary representation.

This page as a plain text file.
%I A080943 #15 Jun 21 2023 06:46:24
%S A080943 3,5,6,7,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,28,29,31,33,
%T A080943 34,35,36,37,38,40,41,42,43,44,46,47,48,49,50,52,53,55,56,57,58,59,61,
%U A080943 62,65,66,67,68,69,70,71,72,73,74,76,77,79,80,81,82,83,84,86,88,89,91,92
%N A080943 Numbers having exactly two divisors that are also suffixes in binary representation.
%C A080943 A080942(a(n))=2, the two divisors are n and 1 for odd numbers and 2 for even numbers.
%H A080943 Reinhard Zumkeller, <a href="/A080943/b080943.txt">Table of n, a(n) for n = 1..10000</a>
%o A080943 (Haskell)
%o A080943 a080943 n = a080943_list !! (n-1)
%o A080943 a080943_list = filter ((== 2) . a080942) [1..]
%o A080943 -- _Reinhard Zumkeller_, Mar 27 2014
%o A080943 (Python)
%o A080943 from itertools import count, islice
%o A080943 from sympy import divisors
%o A080943 def A080943_gen(startvalue=3): # generator of terms >= startvalue
%o A080943     return filter(lambda n:(m:=n&-n)!=n and all(d==m or d==n or (d^n)&((1<<d.bit_length())-1) for d in divisors(n,generator=True)),count(max(startvalue,3)))
%o A080943 A080943_list = list(islice(A080943_gen(),20)) # _Chai Wah Wu_, Jun 20 2023
%Y A080943 Cf. A080945, A080944, A007088, A080940, A080941.
%K A080943 nonn,base
%O A080943 1,1
%A A080943 _Reinhard Zumkeller_, Feb 25 2003