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!)
A061931 Numbers n such that n divides the (right) concatenation of all numbers <= n written in base 2 (most significant digit on right). 143
1, 3, 7, 39, 63, 523, 4983, 25007, 892217, 1142775, 1381311, 1751751 (list; graph; refs; listen; history; text; internal format)
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]
LINKS
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
Sequence in context: A335812 A282427 A192198 * A057203 A056250 A113870
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

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 July 24 15:34 EDT 2024. Contains 374584 sequences. (Running on oeis4.)