Bernie,

Here's a monadic function that does the job:

ap =. 3 :'a#~2=+/"1]0<~."1 q:a=.1+i.y'


ap 20

6 10 12 14 15 18 20

ap 100

6 10 12 14 15 18 20 21 22 24 26 28 33 34 35 36 38 39 40 44 45 46 48 50 51
52 54 55 56 57 58 62 63 65 68 69 72 74 75 76 77 80 82 85 86 87 88 91 92 93
94 95 96 98 99 100

Last ten 'almost primes' through 2030:

_10{.ap 2030

2007 2008 2009 2012 2018 2019 2021 2023 2025 2026


Skip Cave
Cave Consulting LLC


On Mon, Dec 31, 2018 at 8:23 PM Bernie Eckhart <[email protected]>
wrote:

> 1, 3, 673, 2019
>
> 4 factors is almost a prime.
>
> Let's denote only 4 factor numbers like 2019, i.e. every factor is a unique
> integer that occurs only once, as "almost a prime" number.
>
> A problem is to compute efficiently all "almost a prime" numbers between 1
> and any given prime number.
>
> Almost certainly a waste of time unless some pattern might be discovered
> that allows one to predict and compute primes faster than other methods.
>
> I have no idea where to begin because I am not a mathematician and because
> I am very new to J.
>
> HAPPY 2019!
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to