mersenneforum.org (https://www.mersenneforum.org/index.php)
-   And now for something completely different (https://www.mersenneforum.org/forumdisplay.php?f=119)
-   -   Alternating Factorials (https://www.mersenneforum.org/showthread.php?t=22458)

 rogue 2017-07-14 18:41

Alternating Factorials

I've decided to extend [URL="https://oeis.org/A001272"]this OEIS sequence[/URL], which is also known as an [URL="http://mathworld.wolfram.com/AlternatingFactorial.html"]Alternating Factorial[/URL]. I wrote a custom sieve and a pfgw script to process the output file from the sieve. I intend to sieve and test to n = 100000. Like factorials, this form removes a smaller percentage of candidates than other forms. I have sieved to 4e10 and 44% of the original terms still remain. Sieving at this time has a removal rate of about one-fifth what it needs to be in order to sieve to an appropriate depth.

My program can be easily modified to support [URL="http://oeis.org/A100289"]this sequence[/URL], also known as a [URL="http://mathworld.wolfram.com/FactorialSums.html"]Factorial Sum[/URL]. If anyone is interested in taking on such a search, please let me know and I'll cook up some software for you.

 Batalov 2017-07-14 23:55

You must have meant [URL="https://oeis.org/A001272"]A001272[/URL] not A005165.

The beauty of this sequence is that it has the maximum. [SPOILER](because it is finite)[/SPOILER]
If you sieve up to n=[U]3612701[/U] (instead of 100,000) then you "will sieve them all"!

All of similar sequences are likely to be finite.
For example: [URL="https://oeis.org/A063833"]A063833[/URL] :: !n - 3 is prime; it is finite (and complete in its present form) because for all n >= 467, 467 | !n - 3.

[COLOR=Blue][B]Extensions:[/B]
A001272(24) = 43592, Jul 19 2017
A100614(20) = 41532, Jul 22 2017
A100289(19) = 32841, Jul 29 2017[/COLOR]

 rogue 2017-07-15 02:28

Fixed the link. I'll let someone else sieve to the limit.

 rogue 2017-07-16 17:58

I wrote an OpenCL version of the sieving code. It is 20x faster than the assembler code in my other sieve. That makes the decision to switch a no-brainer.

 J F 2017-07-18 06:55

[QUOTE=rogue;463545]I wrote an OpenCL version of the sieving code. It is 20x faster than the assembler code in my other sieve.[/QUOTE]
Any chance to see that in pixsieve some day?

 rogue 2017-07-18 18:19

[QUOTE=J F;463679]Any chance to see that in pixsieve some day?[/QUOTE]

I hadn't thought about it, but that is a possibility.

BTW, due to differences in how the sieves work, the non-GPU code is slower with smaller p than the GPU code. The actual rate is about 12x faster.

 Batalov 2017-07-19 16:13

I searched a little bit with a simplistic sieve and found 43592.

I am now searching for the extension of the half-left-factorials: [url]http://oeis.org/A100614[/url]

 rogue 2017-07-19 16:24

[QUOTE=Batalov;463778]I searched a little bit with a simplistic sieve and found 43592.[/QUOTE]

Found 43592 for what?

 CRGreathouse 2017-07-19 16:48

[QUOTE=rogue;463779]Found 43592 for what?[/QUOTE]

Found that [url=https://oeis.org/A001272]A001272[/url](24) = 43592.

 rogue 2017-07-19 20:10

[QUOTE=CRGreathouse;463780]Found that [url=https://oeis.org/A001272]A001272[/url](24) = 43592.[/QUOTE]

I'm surprised that you poached something I was working on. BTW, I'm still sieving, so I won't do PRP testing until adequately sieved.

 ericw 2017-08-11 14:47

[url]https://oeis.org/A100289[/url]
Numbers n such that (1!)^2 + (2!)^2 + (3!)^2 +...+ (n!)^2 is prime.
a(19) = 32841 from Serge Batalov, Jul 29 2017

All times are UTC. The time now is 05:19.