|
|
A004287
|
|
Least positive multiple of n written in base 7 using only 0 and 1.
|
|
2
|
|
|
1, 11, 111, 11, 101, 111111, 10, 11, 1011, 101, 10011, 111111, 1011, 110, 11001, 1111, 100111, 1101111, 111, 1111, 1110, 11101, 101011, 111111, 101, 111001, 1011, 110, 1111111, 1011111, 100111, 11011, 10011, 100111, 1010, 1101111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
With[{cl=Rest[{FromDigits[#, 7], FromDigits[#]}&/@Tuples[{0, 1}, 7]]}, Table[ SelectFirst[ cl, Mod[#[[1]], n]==0&], {n, 40}]][[;; , 2]] (* Harvey P. Dale, Jan 31 2024 *)
|
|
PROG
|
(Python)
if n > 0:
for i in range(1, 2**n):
s = bin(i)[2:]
if not int(s, 7) % n:
return int(s)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Removed initial 0 since (1) it did not match the definition, and (2) there are many similar sequences with the same author which also say "positive". Also changed offset. - N. J. A. Sloane, Jan 31 2024
|
|
STATUS
|
approved
|
|
|
|