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.

A348352 Primes p where p-1 is in A328596 (reversed binary expansion is an aperiodic necklace) and the same count of numbers smaller than p-1 are found in A328596 as primes smaller than p exist.

This page as a plain text file.
%I A348352 #21 Dec 11 2021 02:11:40
%S A348352 2,3,5,7,13,233,433,27361,121553,30536929
%N A348352 Primes p where p-1 is in A328596 (reversed binary expansion is an aperiodic necklace) and the same count of numbers smaller than p-1 are found in A328596 as primes smaller than p exist.
%C A348352 If this sequence is infinite, then the density of aperiodic necklaces (Lyndon words) in the reversed binary expansion of numbers and the density of prime numbers, may have some interesting connection. If there exists a deeper relation, an analogy of Goldbach's conjecture based on numbers in A328596 could be investigated, would that provide any new knowledge regarding prime numbers?
%F A348352 A348268(a(n) - 1) = a(n).
%F A348352 A348268(a(n)*2^m - 1) = a(n)*2^m.
%F A348352 If A000040(m) = a(n) then A328596(m) = a(n) - 1;
%o A348352 (MATLAB)
%o A348352 function a = A348352(max_range)
%o A348352     a = [];
%o A348352     bits = floor(log2(max_range))+2;
%o A348352     p = primes(max_range);
%o A348352     lw = lyndonwords(1);
%o A348352     lyndonw = lw{2};
%o A348352     for n = 2:bits
%o A348352         lyndonw =[lyndonw lyndonwords(n)];
%o A348352     end
%o A348352     for n = 1:length(p)
%o A348352         prime = p(n);
%o A348352         wraw = bitget(prime-1,1:bits);
%o A348352         word = wraw(1:find(wraw == 1, 1, 'last' ));
%o A348352         if length(lyndonw{n}) == length(word)
%o A348352             if lyndonw{n} == word
%o A348352                 a = [a prime];
%o A348352             end
%o A348352         end
%o A348352     end
%o A348352 end
%o A348352 function words = lyndonwords(maxlen)
%o A348352     words = cell(1);
%o A348352     wordindex = 1;
%o A348352     w = 0;
%o A348352     while ~isempty(w)
%o A348352        len = length(w);
%o A348352        if(len == maxlen)
%o A348352             s = [];
%o A348352             for j = 1:length(w)
%o A348352                 s = [s w(j)];
%o A348352             end
%o A348352             words{wordindex} = s;
%o A348352             wordindex = wordindex + 1;
%o A348352         else
%o A348352             while length(w) < maxlen
%o A348352                  w = [w w(1+length(w)-len)];
%o A348352             end
%o A348352        end
%o A348352         while ~isempty(w) && w(end) == 1
%o A348352             w = w(1:end-1);
%o A348352         end
%o A348352         if ~isempty(w)
%o A348352             w(end) = 1;
%o A348352         end
%o A348352     end
%o A348352 end
%Y A348352 Cf. A000040, A328596, A348268.
%K A348352 nonn,more
%O A348352 1,1
%A A348352 _Thomas Scheuerle_, Oct 14 2021