Re: PARI/GP wrong on 7!!+7+1 being not prime, or oeis.org/Mathematica?
Denis Simon <[email protected]> Tue, 9 Sep 2025 14:03:49 +0200 (CEST)
| Newsgroups | gmane.comp.mathematics.pari.user |
|---|---|
| Message-ID | <[email protected]> |
Another possibility is to add Bill's suggestion in the help ?factorial or ??factorial. Denis SIMON. ----- Mail original ----- > De: "Bill Allombert" <[email protected]> > À: "pari-users" <[email protected]> > Envoyé: Mardi 9 Septembre 2025 10:09:45 > Objet: Re: PARI/GP wrong on 7!!+7+1 being not prime, or oeis.org/Mathematica? > On Thu, Aug 28, 2025 at 02:37:46PM -0400, James Cloos wrote: >> BA> Adding this one would break backward compatibility, so this is not >> BA> an option. >> >> does pari have a generalized factorial function? >> >> maxima's doc notes this: >> >> For an argument ‘n’ which is not an integer, float, or rational, >> ‘n!!’ yields a noun form ‘genfact (n, n/2, 2)’. >> >> perhaps pari's docs could suggest using such a generalized factorial >> when a double factorial is desired? > > You can use > doublefact(n)=vecprod([2*i-1|i<-[1..(n+1)\2]]) > > Cheers, > Bill