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!)
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)
def A004287(n):
if n > 0:
for i in range(1, 2**n):
s = bin(i)[2:]
if not int(s, 7) % n:
return int(s)
return 0 # Chai Wah Wu, Dec 30 2014
CROSSREFS
Cf. A244958 (written in base 10).
Sequence in context: A055016 A259372 A348871 * A061493 A093788 A327992
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
Previous b-file replaced by Harvey P. Dale, Jan 31 2024
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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)