[seqfan] Re: invasion of third rate programs

Alex Meiburg timeroot.alex at gmail.com
Wed Dec 19 06:42:07 CET 2018


Another fun activity would be generating these directly in order, from a
list of primes, instead of just subsequently checking. An algorithm to do
would greatly resemble the lazy implementation for Hamming's problem:
https://en.wikipedia.org/wiki/Regular_number#Algorithms

The approach being:

Let f(k,m) be the list of numbers that can be written as a product of m
distinct primes, each at least k.
This would be stored as a generator, so that it can keep producing
subsequent ones. To produce these, it would keep a list of f(x,m-1), where
x are subsequent primes. It would return the minimum of (some prime at
least k)*f(x > k, m-1) that it hasn't yet. The base case is that f(k,1) is
just the list of primes starting at k.

I know I'm not being too helpful by not contributing any code, just a fun
thought! Might be most practical to do this for the semiprimes or 3-almost
primes, if they don't have it yet, although semiprimes are common enough
that I'm not sure if it's worth it.

-- Alexander Meiburg


On Tue, Dec 18, 2018 at 7:57 PM Frank Adams-watters via SeqFan <
seqfan at list.seqfan.eu> wrote:

> is(n) = omega(n)==8 && issquarefree(n) would also work. These (Hugo's or
> mine) aren't really all that slow; only a small fraction of the values of n
> are factored twice, and the rest is negligible.
>
> Franklin T. Adams-Watters
>
>
> -----Original Message-----
> From: Hugo Pfoertner <yae9911 at gmail.com>
> To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
> Sent: Tue, Dec 18, 2018 11:38 am
> Subject: [seqfan] Re: invasion of third rate programs
>
>
> A123322:
> (PARI) is(n)=omega(n)==8 && bigomega(n)==8
> slow, but correct.
>
>
> On Tue, Dec 18, 2018 at 5:51 PM Joerg Arndt <arndt at jjj.de> wrote:
>
> > The Pari code is wrong, giving [256, 384, 576, 640, 864, 896, 960]
> > when using select(is,vector(10^3,n,n)).
> >
> > I am way too tired to fix, so somebody please do the right thing.
> >
> > Best regards,   jj
> >
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list