OFFSET
1,1
LINKS
John Cerkan, Table of n, a(n) for n = 1..10000
FORMULA
{ x | both x and x + 24 are safe primes }.
EXAMPLE
83 is a safe prime and so is 83 + 24 = 107.
4679 is a safe prime and so is 4679 + 24 = 4703.
MAPLE
A274381:=n->`if`(type((n-1)/2, prime) and isprime(n+24) and isprime(n) and type((n+23)/2, prime), n, NULL): seq(A274381(n), n=1..10^5); # Wesley Ivan Hurt, Jun 25 2016
MATHEMATICA
Select[Prime@ Range[10^4], PrimeQ[(# - 1)/2] && PrimeQ[# + 24] && PrimeQ[(23 + #)/2] &] (* Giovanni Resta, Jun 23 2016 *)
Select[Prime[Range[8000]], AllTrue[{(#-1)/2, (#+23)/2, #+24}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 31 2019 *)
PROG
(PARI) lista(nn) = forprime(p=3, nn, if (isprime((p-1)/2) && isprime(q=p+24) && isprime((q-1)/2), print1(p, ", "))); \\ Michel Marcus, Jun 23 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Debapriyay Mukhopadhyay, Jun 23 2016
STATUS
approved