Re: PARI/GP wrong on 7!!+7+1 being not prime, or oeis.org/Mathematica?

[email protected] Fri, 29 Aug 2025 21:56:02 +0200
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
On 2025-08-28 21:53, Karim Belabas wrote:
> 
> A generic solution:
> 
> ? double_factorial(n) = vecprod(vector(n \ 2, i, n-2*i+2));
> ...
> Cheers,
> 
>     K.B.
> 
Thanks, that is fast and gives same result as oeis series:
https://oeis.org/search?q=5%2c7%2c13%2c113%20id:A118743

~$ gp -q
? double_factorial(n) = vecprod(vector(n \ 2, i, n-2*i+2));
? [s|n<-[1..250];s<-[double_factorial(n)+n+1],isprime(s)]
[3, 5, 7, 13, 113, 3851, 46093, 10321937, 185794579, 
216862434431944426122117120047, 
1874480713189654839282450157086195210900931486780353469173376681742503659434414632312033372643386765197475111737132341321962070865661132800000000000000000173]
?

Regards,

Hermann.