OFFSET
1,1
COMMENTS
Prime numbers of the form (prime(k+1) + 1)*k# +- 1.
EXAMPLE
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.
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.
MAPLE
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
PROG
(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
(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)
CROSSREFS
KEYWORD
nonn
AUTHOR
Tomas Xordan, Jan 12 2007
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus and R. J. Mathar, Jan 25 2007
STATUS
approved