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!)
A071828 Primes of the form Sum_{i=1..k} (-1)^(k-i)*i!. 9

%I #25 Mar 18 2023 20:17:03

%S 5,19,101,619,4421,35899,3301819,1226280710981,115578717622022981,

%T 32656499591185747972776747396512425885838364422981

%N Primes of the form Sum_{i=1..k} (-1)^(k-i)*i!.

%H Charles R Greathouse IV, <a href="/A071828/b071828.txt">Table of n, a(n) for n = 1..14</a>

%H M. Zivkovic, <a href="https://doi.org/10.1090/S0025-5718-99-00990-4">The number of primes sum_(i=1..n)(-1)^(n-i)i! is finite</a>, Math. Comp., vol. 68 (1999), pp. 403-409.

%F a(n) = A005165(A001272(n)).

%t l = Abs@Accumulate[(-1)^#*#! & /@ Range@99]; l[[Flatten@Position[l, _?PrimeQ]]] (* _Hans Rudolf Widmer_, Feb 27 2023 *)

%o (PARI) for(n=1,120,if(isprime(abs(sum(i=1,n,(-1)^i*i!)))==1,print1(abs(sum(i=1,n,(-1)^i*i!)),",")))

%o (PARI) v=[];for(n=1,1000, if(ispseudoprime(t=abs(sum(i=1,n,(-1)^i*i!))), v=concat(v,t))); v \\ _Charles R Greathouse IV_, Feb 14 2011

%Y Cf. A001272, A005165.

%K nonn,fini

%O 1,1

%A _Benoit Cloitre_, Jun 08 2002

%E Edited by _R. J. Mathar_, Aug 28 2007

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 April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)