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!)
A309789 Numbers n such that -1 + Sum_{k=1..n} prime(k)! is prime, where prime(k) is the k-th prime. 0
2, 3, 4, 20, 25 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The sequence is finite. Proof: for n=112, the sum is 2! + 3! + 5! + ... + 601! + 607! - 1, which is divisible by the next prime, 613. All the factorials of the subsequent primes 613!, 617!, ... are obviously divisible by 613. So after n=112 the sum will always be divisible by 613. And from n=26 to n=112 there are no other primes. So this sequence will not produce any other primes. - Metin Sariyar, Aug 26 2019
LINKS
EXAMPLE
4 is a term because 2, 3, 5, 7 are the first 4 primes and 2! + 3! + 5! + 7! - 1 = 5167 is prime.
MATHEMATICA
p=-1; lst={}; Do[p+=Prime[n]!; If[PrimeQ[p], AppendTo[lst, n]], {n, 1000}]; lst
Position[Accumulate[Prime[Range[25]]!], _?(PrimeQ[#-1]&)]//Flatten (* Harvey P. Dale, May 03 2021 *)
PROG
(PARI) isok(n) = isprime(sum(k=1, n, prime(k)!) - 1); \\ Michel Marcus, Aug 18 2019
CROSSREFS
Sequence in context: A024632 A300902 A352581 * A012578 A012573 A268349
KEYWORD
nonn,fini,full
AUTHOR
Metin Sariyar, Aug 17 2019
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 July 29 19:12 EDT 2024. Contains 374734 sequences. (Running on oeis4.)