OFFSET
1,2
COMMENTS
In other words, the ones in the binary representation of a term of this sequence encode the first numbers coprime to this term.
This sequence contains every term of A001348: 2^2 - 1 belongs to this sequence, and for any odd prime number p, if q divides 2^p - 1, then q > p and gcd(p, i) = 1 for i = 1..p.
See A320673 for similar sequences.
EXAMPLE
The first terms, alongside their binary representation and the coprime numbers encoded therein, are:
n a(n) bin(a(n)) First numbers coprime
-- ---- --------- ---------------------
1 1 1 1
2 2 10 1
3 3 11 1, 2
4 7 111 1, 2, 3
5 10 1010 1, 3
6 20 10100 1, 3
7 27 11011 1, 2, 4, 5
8 31 11111 1, 2, 3, 4, 5
9 40 101000 1, 3
10 127 1111111 1, 2, 3, 4, 5, 6, 7
PROG
(PARI) is(n) = my (b=binary(n)); b==vector(#b, k, gcd(n, k)==1)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 19 2018
STATUS
approved