This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A309789 #41 May 03 2021 12:16:33 %S A309789 2,3,4,20,25 %N A309789 Numbers n such that -1 + Sum_{k=1..n} prime(k)! is prime, where prime(k) is the k-th prime. %C A309789 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 %e A309789 4 is a term because 2, 3, 5, 7 are the first 4 primes and 2! + 3! + 5! + 7! - 1 = 5167 is prime. %t A309789 p=-1; lst={}; Do[p+=Prime[n]!; If[PrimeQ[p], AppendTo[lst, n]], {n, 1000}]; lst %t A309789 Position[Accumulate[Prime[Range[25]]!],_?(PrimeQ[#-1]&)]//Flatten (* _Harvey P. Dale_, May 03 2021 *) %o A309789 (PARI) isok(n) = isprime(sum(k=1, n, prime(k)!) - 1); \\ _Michel Marcus_, Aug 18 2019 %Y A309789 Cf. A000040, A000142, A002982, A111179, A039716. %K A309789 nonn,fini,full %O A309789 1,1 %A A309789 _Metin Sariyar_, Aug 17 2019