The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089043 a(n) = n!^2 + (-1)^n. 1
0, 5, 35, 577, 14399, 518401, 25401599, 1625702401, 131681894399, 13168189440001, 1593350922239999, 229442532802560001, 38775788043632639999, 7600054456551997440001, 1710012252724199423999999, 437763136697395052544000001, 126513546505547170185215999999 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
p = 2*n+1 is prime iff it divides a(n) (Wilson's theorem) for instance let n=5, p =11 : a(5) = 14399 = 11*1309, so 11 is prime.
LINKS
FORMULA
a(n) = n^2*(a(n-1)-(-1)^(n-1))+(-1)^n.
EXAMPLE
a(5) = 14399 because 14399=(5!)^2+(-1)^5.
PROG
(PARI) a(n) = n!^2+(-1)^n; \\ Michel Marcus, Oct 02 2016
CROSSREFS
Sequence in context: A011556 A361055 A194927 * A317995 A260075 A317816
KEYWORD
easy,nonn
AUTHOR
Serge Boisse (serge.boisse(AT)aviation-civile.gouv.fr), Dec 02 2003
EXTENSIONS
Offset corrected and edited by Michel Marcus, Oct 02 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 23:04 EDT 2024. Contains 372497 sequences. (Running on oeis4.)