login
A080943
Numbers having exactly two divisors that are also suffixes in binary representation.
7
3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83, 84, 86, 88, 89, 91, 92
OFFSET
1,1
COMMENTS
A080942(a(n))=2, the two divisors are n and 1 for odd numbers and 2 for even numbers.
LINKS
PROG
(Haskell)
a080943 n = a080943_list !! (n-1)
a080943_list = filter ((== 2) . a080942) [1..]
-- Reinhard Zumkeller, Mar 27 2014
(Python)
from itertools import count, islice
from sympy import divisors
def A080943_gen(startvalue=3): # generator of terms >= startvalue
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)))
A080943_list = list(islice(A080943_gen(), 20)) # Chai Wah Wu, Jun 20 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Feb 25 2003
STATUS
approved