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!)
A320386 a(n) is the smallest positive integer such that the binary representation of n*a(n) is a "binary square" (i.e., a term of A020330). 1
3, 5, 1, 9, 2, 6, 9, 17, 4, 1, 17, 3, 17, 17, 1, 33, 8, 2, 33, 33, 3, 24, 33, 22, 33, 33, 2, 33, 33, 22, 33, 65, 16, 4, 65, 1, 65, 65, 22, 52, 65, 22, 65, 12, 1, 65, 65, 11, 65, 52, 3, 40, 65, 1, 12, 65, 11, 65, 65, 11, 65, 65, 1, 129, 32, 8, 129, 2, 11, 39 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) exists because if n has t bits, then (2^t+1)*n is a binary square.
LINKS
EXAMPLE
a(5) = 2 because 5 is not a binary square, but 5*2 = 10 is (its binary representation is 1010).
MAPLE
a:= proc(n) local k; for k while not (s-> (l->
l::even and s[1..l/2]=s[l/2+1..l])(length(s)))(
convert(convert(k*n, binary), string)) do od; k
end:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 12 2018
PROG
(PARI) is(n) = my(L=#binary(n)\2); n>>L==bitand(n, 2^L-1); \\ A020330
a(n) = my(k=1); while (!is(k*n), k++); k; \\ Michel Marcus, Oct 12 2018
CROSSREFS
Cf. A020330.
Sequence in context: A212695 A209422 A361944 * A112411 A283838 A228146
KEYWORD
nonn,base
AUTHOR
Jeffrey Shallit, Oct 12 2018
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 August 12 19:26 EDT 2024. Contains 375113 sequences. (Running on oeis4.)