|
|
A164563
|
|
A positive integer n is included if the distinct odd numerical values of substrings in the binary representation of n are all coprime to each other.
|
|
2
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 20, 21, 22, 23, 24, 26, 28, 29, 32, 33, 34, 35, 36, 37, 40, 41, 42, 44, 46, 48, 49, 52, 56, 58, 64, 65, 66, 68, 69, 70, 72, 73, 74, 80, 81, 82, 84, 88, 92, 96, 98, 104, 112, 116, 128, 129, 130, 131, 132, 133, 136, 137, 138, 140, 144, 145
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
n is in the sequence if and only if 2*n is in the sequence.
Contains 2^k+1 for all k. (End)
|
|
LINKS
|
|
|
EXAMPLE
|
27 in binary is 11011. The substrings of this, each with a distinct odd numerical value, (and their decimal equivalents) are 1 (1), 11 (3), 101 (5), 1011 (11), 1101 (13), 11011 (27). Since 3 is not coprime to 27, then 27 is not in this sequence.
However, 21 in binary is 10101. The distinct odd substrings are 1, 101 (5), and 10101 (21). Since 1, 5, and 21 are all coprime to each other, then 21 is in this sequence.
|
|
MAPLE
|
f:= proc(n) local L, J, S, i, j, k;
L:= convert(n, base, 2);
J:= select(t -> L[t]=1, [$1..nops(L)]);
S:= map(t -> add(2^(k-1)*t[k], k=1..nops(t)), {seq(seq(L[J[i]..J[j]], i=1..j), j=1..nops(J))});
ilcm(op(S))=convert(S, `*`)
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|