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.

A343765 Lexicographically earliest sequence of distinct nonprime numbers such that for any n > 0, a(n+1) = a(n) XOR 2^k for some k >= 0 as small as possible (where XOR denotes the bitwise XOR operator).

This page as a plain text file.
%I A343765 #7 May 01 2021 02:14:07
%S A343765 1,9,8,10,14,15,143,142,140,141,133,132,134,135,391,390,388,384,385,
%T A343765 387,386,394,395,393,392,396,398,399,415,414,412,413,405,404,406,407,
%U A343765 403,402,400,408,410,411,475,474,472,473,477,476,478,470,471,469,468,464
%N A343765 Lexicographically earliest sequence of distinct nonprime numbers such that for any n > 0, a(n+1) = a(n) XOR 2^k for some k >= 0 as small as possible (where XOR denotes the bitwise XOR operator).
%C A343765 This sequence is similar to A003188 and to A059459; here we deal with nonprime numbers, there with integers and prime numbers, respectively.
%C A343765 Will the value 4 ever appear?
%H A343765 Rémy Sigrist, <a href="/A343765/b343765.txt">Table of n, a(n) for n = 1..10000</a>
%H A343765 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e A343765 The first terms, alongside their binary expansion, are:
%e A343765   n   a(n)  bin(a(n))
%e A343765   --  ----  ---------
%e A343765    1     1          1
%e A343765    2     9       1001
%e A343765    3     8       1000
%e A343765    4    10       1010
%e A343765    5    14       1110
%e A343765    6    15       1111
%e A343765    7   143   10001111
%e A343765    8   142   10001110
%e A343765    9   140   10001100
%e A343765   10   141   10001101
%e A343765   11   133   10000101
%e A343765   12   132   10000100
%e A343765   13   134   10000110
%e A343765   14   135   10000111
%e A343765   15   391  110000111
%e A343765   16   390  110000110
%e A343765   17   388  110000100
%e A343765   18   384  110000000
%e A343765   19   385  110000001
%e A343765   20   387  110000011
%o A343765 (PARI) s=2^0; v=1; for (n=1, 54, print1 (v", "); s+=2^v; for (x=0, oo, if (!bittest(s, w=bitxor(v, 2^x)) && !isprime(w), v=w; break)))
%Y A343765 Cf. A003188, A018252, A059459.
%K A343765 nonn,base
%O A343765 1,2
%A A343765 _Rémy Sigrist_, Apr 28 2021