cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A329877 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.

Original entry on oeis.org

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, 134, 94, 84, 6, 57, 103, 13, 92, 63, 90, 60, 156, 39, 10, 108, 114, 65, 78, 67, 52, 57, 11, 21, 114, 79, 366, 128, 76, 22, 382, 36, 88, 34, 68, 110, 2, 72, 14, 28
Offset: 1

Views

Author

Rémy Sigrist, Nov 23 2019

Keywords

Comments

This sequence is a binary variant of A329876.
For any n > 0, the binary concatenation of a(n+1) and A329875(n) gives A329875(n+1).

Examples

			The first terms, alongside their binary representations and the corresponding concatenations, are:
  n   a(n)  bin(a(n))  bin(A329875(n))
  --  ----  ---------  -----------------------
   1     1          1                        1
   2     1          1                       11
   3     1          1                      111
   4     2         10                    10111
   5     4        100                 10010111
   6     3         11               1110010111
   7     7        111            1111110010111
   8    10       1010        10101111110010111
   9    18      10010   1001010101111110010111
  10     1          1  11001010101111110010111
		

Crossrefs

See A329875 for the corresponding concatenations.
Cf. A329876.

Programs

  • 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)))