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.

A365518 Odd primes whose base-2 representation has no proper substrings that are base-2 representations of odd primes.

This page as a plain text file.
%I A365518 #9 Sep 08 2023 13:18:46
%S A365518 3,5,17,73,257,521,577,1033,1153,2081,2113,4129,16417,18433,32801,
%T A365518 32833,65537,74017,133121,147457,262153,262433,262657,270337,270601,
%U A365518 271393,295937,524353,524801,525313,532489,1048609,1049089,1056833,1065089,1082369,1179649,1183753,2101249,2367553,4194433
%N A365518 Odd primes whose base-2 representation has no proper substrings that are base-2 representations of odd primes.
%C A365518 All terms of A365512 are terms of this sequence. The first term that does not occur in A365512 appears to be 521.
%H A365518 Robert Israel, <a href="/A365518/b365518.txt">Table of n, a(n) for n = 1..5590</a>
%e A365518 a(4) = 73 is a term because 73 is an odd prime, its binary representation is 1001001, and no proper substring of 1001001 is the binary representation of an odd prime.
%p A365518 R:= NULL:
%p A365518 S[1]:= {1};
%p A365518 for d from 2 to 30 do
%p A365518   S[d]:= {};
%p A365518   for m from 1 to d-1 do
%p A365518     for x in S[m] do
%p A365518       y:= x + 2^(d-1);
%p A365518       flag:= false;
%p A365518       for j from 1 to m do
%p A365518         w:= floor(y/2^j);
%p A365518         if w::odd and isprime(w) then flag:= true; break fi;
%p A365518       od;
%p A365518       if flag then next fi;
%p A365518       if isprime(y) then R:= R,y
%p A365518       else S[d]:= S[d] union {y}
%p A365518       fi
%p A365518 od od od:
%p A365518 R;
%Y A365518 Cf. A365512.
%K A365518 nonn,base
%O A365518 1,1
%A A365518 _Robert Israel_, Sep 07 2023