OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
41 has reversed binary expansion (1,0,0,1,0,1) with positions of 1's being {1,4,6}, which are not pairwise coprime, so 41 is not in the sequence.
MAPLE
extend:= proc(L) local C, c;
C:= select(t -> andmap(s -> igcd(s, t)=1, L), [$1..L[-1]-1]);
L, seq(procname([op(L), c]), c=C)
end proc:
g:= proc(L) local i;
add(2^(i-1), i=L)
end proc:
map(g, [[1], seq(extend([k])[2..-1], k=2..10)]); # Robert Israel, Jul 19 2019
MATHEMATICA
Select[Range[100], CoprimeQ@@Join@@Position[Reverse[IntegerDigits[#, 2]], 1]&]
PROG
(PARI) is(n) = my (p=1); while (n, my (o=1+valuation(n, 2)); if (gcd(p, o)>1, return (0), n-=2^(o-1); p*=o)); return (1) \\ Rémy Sigrist, Jul 19 2019
CROSSREFS
KEYWORD
AUTHOR
Gus Wiseman, Jul 17 2019
STATUS
approved