A326675 The positions of 1's in the reversed binary expansion of n are pairwise coprime, where a singleton is not coprime unless it is {1}.
1, 3, 5, 6, 7, 9, 12, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 33, 48, 49, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 96, 97, 112, 113, 129, 132, 133, 144, 145, 148, 149, 192, 193, 196, 197, 208, 209, 212
Offset: 1
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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]&]
-
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