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 A125191 #26 Jul 15 2025 14:47:47 %S A125191 2,7,37,239,241,2521,32341,540539,540541,232792559,232792561, %T A125191 207030183359,311671001662019,41287621429375723111588738861, %U A125191 5801527386969669153864265802424086050777441586253956297278498679 %N A125191 Primes of the form k# + (k+1)# +- 1, where k# = A002110(k) = primorial(k). %C A125191 Prime numbers of the form (prime(k+1) + 1)*k# +- 1. %e A125191 Let k = 1; then 1#+2# = 2+6 = 8, 8-1 = 7 is prime (hence a term of the sequence) but 8+1 = 9 is nonprime. %e A125191 Let k = 3; then 3#+4# = 30+210 = 240, 240-1 = 239 is prime and 240+1 = 241 is also prime, so both are terms. %p A125191 A002110 := 1 : A000040 := 2 : for n from 1 to 38 do if isprime(A002110*(1+A000040)-1) then printf("%d,",A002110*(1+A000040)-1) ; fi ; if isprime(A002110*(1+A000040)+1) then printf("%d,",A002110*(1+A000040)+1) ; fi ; A002110 := A002110*A000040 : A000040 := nextprime(A000040) : od : # _R. J. Mathar_, Jan 26 2007 %t A125191 plim=45;k= FoldList[Times, 1, Prime[Range[plim]]];m=Table[k[[l]]+k[[l+1]],{l,plim}];Sort[Select[Join[m+1,m-1],PrimeQ]] (* _James C. McMahon_, Dec 15 2024 *) %t A125191 Join[{2},Select[Sort[Flatten[#+{1,-1}&/@(Total/@Partition[FoldList[Times,Prime[Range[40]]],2,1])]],PrimeQ]] (* _Harvey P. Dale_, Jul 15 2025 *) %o A125191 (PARI) {m=37;for(n=0,m,p=primorial(n)+primorial(n+1);if(isprime(a=p-1),print1(a,","));if(isprime(a=p+1),print1(a,",")))} \\ _Klaus Brockhaus_, Jan 25 2007 %o A125191 (PARI) genit(maxx)={arr=List();for(n=0, maxx, p=factorback(primes(n))+factorback(primes(n+1));if(ispseudoprime(p-1),listput(arr,p-1));if(ispseudoprime(p+1),listput(arr,p+1)));arr} \\ _Bill McEachen_, Jun 21 2021 (from _David A. Corneth_'s code at A002110) %Y A125191 Cf. A002110 (primorial numbers), A006862 (Euclid numbers), A057588 (Kummer numbers). %K A125191 nonn %O A125191 1,1 %A A125191 _Tomas Xordan_, Jan 12 2007 %E A125191 Edited, corrected and extended by _Klaus Brockhaus_ and _R. J. Mathar_, Jan 25 2007