%I #7 Nov 23 2019 13:21:20
%S 1,1,1,2,4,3,7,10,18,1,13,5,2,42,3,3,22,18,23,15,29,33,23,17,5,33,3,
%T 134,94,84,6,57,103,13,92,63,90,60,156,39,10,108,114,65,78,67,52,57,
%U 11,21,114,79,366,128,76,22,382,36,88,34,68,110,2,72,14,28
%N Lexicographically earliest sequence of positive integers such that for n > 1, the concatenation of a(n), a(n-1), ..., a(1), in binary, is a prime number.
%C This sequence is a binary variant of A329876.
%C For any n > 0, the binary concatenation of a(n+1) and A329875(n) gives A329875(n+1).
%e The first terms, alongside their binary representations and the corresponding concatenations, are:
%e n a(n) bin(a(n)) bin(A329875(n))
%e -- ---- --------- -----------------------
%e 1 1 1 1
%e 2 1 1 11
%e 3 1 1 111
%e 4 2 10 10111
%e 5 4 100 10010111
%e 6 3 11 1110010111
%e 7 7 111 1111110010111
%e 8 10 1010 10101111110010111
%e 9 18 10010 1001010101111110010111
%e 10 1 1 11001010101111110010111
%o (PARI) print1 (v=1); for (n=2, 69, s=(b=2)^#digits(v, b); for (k=1, oo, if (isprime(v+=s), print1 (", "k); break)))
%Y See A329875 for the corresponding concatenations.
%Y Cf. A329876.
%K nonn,base
%O 1,4
%A _Rémy Sigrist_, Nov 23 2019
|