cp's OEIS Frontend

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.

A249798 Numbers k such that the product of the first k primes minus the (k+1)-th prime is prime.

This page as a plain text file.
%I A249798 #16 Nov 08 2024 15:19:41
%S A249798 3,4,5,6,8,22,23,24,35,73,83,147,553,1098,1115,1542,2097,2149,8712,
%T A249798 19965,25046,30987,38635
%N A249798 Numbers k such that the product of the first k primes minus the (k+1)-th prime is prime.
%F A249798 a(n) = primepi(A093078(n)). - _Michel Marcus_, Nov 06 2014
%e A249798 p(1)*p(2)*p(3)*p(4) - p(5) = 2*3*5*7 - 11 = 199. 199 is prime, therefore 4 is in the sequence.
%t A249798 Select[Range[1000],PrimeQ[Times@@(Prime[Range[#]])-Prime[#+1]]&]
%o A249798 (PARI) lista(nn) = {prp = 1; for(n=1, nn, prp *= prime(n); if (isprime(prp-prime(n+1)), print1(n, ", ")););} \\ _Michel Marcus_, Nov 06 2014
%Y A249798 Cf. A000040, A093078.
%K A249798 nonn,more
%O A249798 1,1
%A A249798 _Ivan N. Ianakiev_, Nov 06 2014
%E A249798 a(17)-a(18) using A093078 from _Michael S. Branicky_, Mar 18 2024
%E A249798 a(19)-a(23) from _Henri Lifchitz_, Nov 08 2024