|
| |
|
|
A164702
|
|
Write n in binary. Insert one 0 right of any one 1. a(n) = the smallest possible composite equal to the value of any such resulting binary number.
|
|
5
| |
|
|
4, 6, 8, 9, 10, 14, 16, 18, 18, 21, 20, 21, 22, 27, 32, 33, 34, 35, 36, 42, 38, 39, 40, 49, 42, 51, 44, 45, 46, 55, 64, 65, 66, 69, 68, 69, 70, 75, 72, 81, 74, 75, 76, 77, 78, 87, 80, 81, 82, 99, 84, 85, 86, 87, 88, 105, 90, 91, 92, 93, 94, 95, 128, 129, 130, 133, 132, 133, 134
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 2,1
|
|
|
EXAMPLE
| 9 in binary is 1001. Putting a 0 after the first 1 results in 10001, which is 17 in decimal. Putting a 0 after the last 1 results in 10010, which is 18 in decimal. 17 is < 18, but 17 is prime. So a(9) = 18, a composite.
|
|
|
MAPLE
| rebase := proc(L, b) add( op(i, L)*b^(i-1), i=1..nops(L)) ; end proc: A164702 := proc(n) local bdg, a, p, bplu, newa ; bdg := convert(n, base, 2) ; a := -1 ; for p from 1 to nops(bdg) do if op(p, bdg) = 1 then bplu := [op(1..p-1, bdg), 0, op(p..nops(bdg), bdg)] ; newa := rebase(bplu, 2) ; if newa > 3 and not isprime(newa) then if a = -1 or newa < a then a := newa ; end if; end if; end if; end do ; return a ; end proc: seq(A164702(n), n=2..100) ; [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 27 2010]
|
|
|
CROSSREFS
| Sequence in context: A132858 A071941 A180366 * A001745 A050695 A035139
Adjacent sequences: A164699 A164700 A164701 * A164703 A164704 A164705
|
|
|
KEYWORD
| base,nonn
|
|
|
AUTHOR
| Leroy Quet, Aug 22 2009
|
|
|
EXTENSIONS
| Terms beyond a(13) from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 27 2010
|
| |
|
|