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.

A306581 Lexicographically earliest sequence of distinct positive terms such that the binary representations of two consecutive terms can always been concatenated in some order, without leading zero, to produce the binary representation of a prime number.

This page as a plain text file.
%I A306581 #16 Feb 27 2019 11:50:40
%S A306581 1,2,3,4,5,6,11,8,7,9,13,10,17,12,25,18,23,15,14,19,20,21,26,27,31,29,
%T A306581 16,37,34,45,22,39,28,55,46,57,35,24,43,36,47,33,32,41,38,67,30,53,42,
%U A306581 61,40,49,48,73,50,51,59,56,69,44,63,52,77,60,79,54,65
%N A306581 Lexicographically earliest sequence of distinct positive terms such that the binary representations of two consecutive terms can always been concatenated in some order, without leading zero, to produce the binary representation of a prime number.
%C A306581 This sequence is the binary variant of A228323.
%C A306581 The sequence is well defined; the argument used to prove that A018800(n) always exists applies here also.
%H A306581 Rémy Sigrist, <a href="/A306581/b306581.txt">Table of n, a(n) for n = 1..10000</a>
%H A306581 Rémy Sigrist, <a href="/A306581/a306581_4.png">Colored scatterplot of (n, a(n)) for n = 1..10000</a> (where the color corresponds to the parity of a(n): red for odd, blue for even)
%H A306581 Rémy Sigrist, <a href="/A306581/a306581_5.png">Colored scatterplot of (n, a(n)-n) for n = 1..1000000</a> (where the color corresponds to the parity of a(n)-n: red for odd, blue for even)
%H A306581 Rémy Sigrist, <a href="/A306581/a306581_6.png">Scatterplot of the first 1000000 terms of the ordinal transform of n -> a(n)-n</a>
%H A306581 Rémy Sigrist, <a href="/A306581/a306581_1.gp.txt">PARI program for A306581</a>
%e A306581 The first terms, alongside their binary representations, and the concatenation of consecutive terms, with prime numbers denoted by a star, are:
%e A306581   n   a(n)  bin(a(n))  bin(a(n)a(n+1))  bin(a(n+1)a(n))
%e A306581   --  ----  ---------  ---------------  ---------------
%e A306581    1     1          1              110              101*
%e A306581    2     2         10             1011*            1110
%e A306581    3     3         11            11100            10011*
%e A306581    4     4        100           100101*          101100
%e A306581    5     5        101           101110           110101*
%e A306581    6     6        110          1101011*         1011110
%e A306581    7    11       1011         10111000         10001011*
%e A306581    8     8       1000          1000111*         1111000
%e A306581    9     7        111          1111001          1001111*
%e A306581   10     9       1001         10011101*        11011001
%t A306581 a = {1}; c[x_, y_] := FromDigits[Join @@ IntegerDigits[{x, y}, 2], 2]; While[Length@a < 67, j=1; While[MemberQ[a, j] || ! (PrimeQ@ c[a[[-1]], j] || PrimeQ@ c[j, a[[-1]]]), j++]; AppendTo[a, j]]; a (* _Giovanni Resta_, Feb 27 2019 *)
%o A306581 (PARI) See Links section.
%Y A306581 See A228323 for the decimal variant.
%Y A306581 Cf. A018800.
%K A306581 nonn,base
%O A306581 1,2
%A A306581 _Rémy Sigrist_, Feb 25 2019