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.

A128659 Numbers k such that p(k+1)# - p(k)# - p(k-1)# - 1 is prime, where p(i)# = product of first i primes = A002110(i).

This page as a plain text file.
%I A128659 #23 May 11 2025 01:05:12
%S A128659 1,3,4,5,6,7,9,13,14,20,30,40,44,86,101,135,152,171,205,4404,12227
%N A128659 Numbers k such that p(k+1)# - p(k)# - p(k-1)# - 1 is prime, where p(i)# = product of first i primes = A002110(i).
%e A128659 1 is a term since A002110(2) - A002110(1) - A002110(0) - 1 = 6 - 2 - 1 - 1 = 2.
%t A128659 {1}~Join~Flatten[Position[Partition[Rest[FoldList[Times,1,Prime[Range[210]]]],3,1],_?(PrimeQ[#[[3]]-#[[2]]-#[[1]]-1]&),{1},Heads->False]]+1 (* This generates the first 18 terms of the sequence.  To generate the 19th term, change the Range constant to 4410, but it will take a very long time to run. *) (* _Harvey P. Dale_, Apr 23 2014 *)
%o A128659 (PARI) isok(k) = ispseudoprime(vecprod(primes(k+1)) - vecprod(primes(k)) - vecprod(primes(k-1)) - 1); \\ _Michel Marcus_, May 07 2025
%Y A128659 Cf. A002110, A128420, A128421, A128657, A128658, A128660, A128661, A128662.
%K A128659 nonn,hard,more
%O A128659 1,2
%A A128659 _Pierre CAMI_, Mar 19 2007
%E A128659 a(1) = 1 inserted by _Michael S. Branicky_, May 07 2025
%E A128659 a(21) from _Michael S. Branicky_, May 10 2025