The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A119555 Primes in the sequence f(n) = f(n-1)+((-1)^n)*n!, with f(0)=0. 0
 19, 619, 35899, 3301819, 468544077492065936712052044718939948687543330546977719976017418129955876663406131164377030450551575840099843957105136480237871017419158043635450756712088769133544426722033165168878328322819566779381528981882285541609256481166622331374702000809600061055686236758821446539362161635577019 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS f(n) = (-1)^n*A005165(n). The primes are those terms in A071828 which correspond to even n values in A001272: n = 4, 6, 8, 10, 160, 4998, 9158, 11164 (the last three are only probable primes). 3612703 divides f(n) for n >= 3612702, so the sequence is finite. - Jens Kruse Andersen, Jul 04 2014 REFERENCES G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 160. LINKS EXAMPLE f(0)=0, f(1) = 0+((-1)^1)*1! = -1, f(2) = -1+((-1)^2)*2! = 1, f(3) = 1+((-1)^3)*3! = -5, f(4) = -5+((-1)^4)*4! = 19, which is prime, so 19 is the first term of the sequence. MAPLE P:=proc(n) local i, j; j:=0; for i from 1 by 1 to n do j:=j+((-1)^i)*i!; if isprime(j) then print(j); fi; od; end: P(100); MATHEMATICA nxt[{n_, a_}]:={n+1, a+(-1)^(n+1) (n+1)!}; Select[NestList[nxt, {0, 0}, 200][[All, 2]], #>0&&PrimeQ[#]&] (* Harvey P. Dale, Jan 22 2017 *) CROSSREFS Cf. A005165, A071828, A001272. Sequence in context: A317029 A183516 A290007 * A107118 A251602 A217824 Adjacent sequences:  A119552 A119553 A119554 * A119556 A119557 A119558 KEYWORD nonn,fini AUTHOR Paolo P. Lava and Giorgio Balzarotti, May 30 2006 EXTENSIONS Offset changed to 1 (this is a list) from Bruno Berselli, Feb 16 2012 Formula in name corrected by Jens Kruse Andersen, Jul 04 2014 STATUS approved

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

Last modified August 3 14:46 EDT 2020. Contains 336198 sequences. (Running on oeis4.)