OFFSET
1,2
COMMENTS
This sequence differs from A029495 in that all least significant zeros are removed before concatenation.
No more terms < 10^7. [Lars Blomberg, Oct 17 2011]
EXAMPLE
1234567 -> (1)(01)(11)(001)(101)(011)(111) base 2 -> 1111110111111 base 2 = 8127 and 7 divides 8127.
MATHEMATICA
b = 2; c = {}; Select[Range[10^4], Divisible[FromDigits[
c = Join[c, IntegerDigits[IntegerReverse[#, b], b]], b], #] &] (* Robert Price, Mar 07 2020 *)
PROG
(Python)
def agen():
k, concat = 1, 1
while True:
if concat%k == 0: yield k
revbink_even = (bin(k+1)[2:])[::-1]
revbink_odd = '1' + revbink_even[1:]
add_str = revbink_even[revbink_even.index('1'):] + revbink_odd
concat = (concat << len(add_str)) + int(add_str, 2)
k += 2
g = agen()
print([next(g) for i in range(8)]) # Michael S. Branicky, Jan 03 2021
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Larry Reeves (larryr(AT)acm.org), May 24 2001
EXTENSIONS
Edited and updated by Larry Reeves (larryr(AT)acm.org), Apr 12 2002
a(9)-a(12) from Lars Blomberg, Oct 17 2011
STATUS
approved