A293194 - OEIS
2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 47, 53, 59, 71, 79, 89, 107, 127, 149, 179, 191, 199, 239, 269, 359, 383, 431, 449, 479, 499, 599, 647, 719, 809, 863, 971, 1151, 1249, 1279, 1439, 1499, 1619, 1999, 2399, 2591, 2699, 2879, 2999, 4049, 4373, 4799, 4999, 5119, 5399, 6143, 6911
COMMENTS
Mersenne primes A000668 occur when (q, r, s) = (q, 0 ,0) with q > 0.
a(2) = 3 is a Mersenne prime but a(3) = 7 is not.
For n > 2, all terms = {1, 5} mod 6.
EXAMPLE
3 is a member because 3 is a prime number and 2^2 * 3^0 * 5^0 - 1 = 3.
89 is a member because 89 is a prime number and 2^1 * 3^2 * 5^1 - 1 = 89.
list of (q, r, s): (0, 1, 0), (2, 0, 0), (1, 1, 0), (3, 0, 0), (2, 1, 0), (1, 2, 0), (2, 0, 1), (3, 1, 0),(1, 1, 1), (5, 0, 0), (4, 1, 0), (1, 3, 0), (2, 1, 1), ...
MAPLE
N:= 10^6: # to get all terms <= N
R:= {}:
for c from 0 to floor(log[5]((N+1))) do
for b from 0 to floor(log[3]((N+1)/5^c)) do
R:= R union select(isprime, {seq(2^a*3^b*5^c-1,
a=0..ilog2((N+1)/(3^b*5^c)))})
od od:
MATHEMATICA
With[{n = 7000}, Sort@ Select[Flatten@ Table[2^q * 3^r * 5^s - 1, {q, 0, Log[2, n/(1)]}, {r, 0, Log[3, n/(2^q)]}, {s, 0, Log[5, n/(2^q * 3^r)]}], PrimeQ]] (* Michael De Vlieger, Oct 02 2017 *)
PROG
(GAP) K := 10^5 + 1;; # to get all terms less than or equal to K
A := Filtered([1 .. K], IsPrime);; I := [3, 5];;
B := List(A, i -> Elements(Factors(i + 1)));;
C := List([0 .. Length(I)], j -> List(Combinations(I, j), i -> Concatenation([2], i)));
A293194 := Concatenation([2], List(Set(Flat(List([1 .. Length(C)], i -> List([1 .. Length(C[i])], j -> Positions(B, C[i][j]))))), i -> A[i]));
(PARI) lista(nn) = {forprime(p=2, nn, if (vecmax(factor(p+1)[, 1]) <= 5, print1(p, ", ")); ); } \\ Michel Marcus, Oct 06 2017