[seqfan] Re: Biprimes of K

L. Edson Jeffery lejeffery2 at gmail.com
Wed Sep 17 19:54:30 CEST 2014


Maximilian,

In Eric's sieve, as with the sieve of Eratosthenes, terms can be
underlined, circled or otherwise marked in some way but not removed
(erased, deleted, set to zero, etc.). One really can't entirely ignore
subsequent terms that have already been underlined when doing this
procedure by hand.

However, dropping the first two terms {1,1} of A026242 by defining the
sequence S = {S(n)} = {A026242(n+2)} = {2,3,2,4,3,...}, I think that the
index of the first occurrence of m in S is given by A026273. So, unless I
am wrong, you might then use something like the following pseudocode to
find BIP more efficiently than with the original sieve:

1. L={}; (empty list)

2. for n=1..n_max
     U(n) = 1; (U(n)==0 will mean that S(n) is underlined)
   next n;

3. for n=1..n_max
     for k=1..k_max
       U(A026273(n) + k*S(A026273(n))) = 0;
     next k
   next n

4. for m=1..m_max
     if U(m) = 1, then append the index m to L
   next m

5. for j=1..length(L)
     BIP(j) = S(L(j))

I hope I have not made any mistakes. If all is well, then L should contain
the indices of all elements of S which were not "underlined," so BIP =
{2,3,4,5,8,15,...} as stated by Eric. Can you try this in Pari, please? It
would also be interesting to see what L turns out to be.

Ed Jeffery



More information about the SeqFan mailing list