OFFSET
1,1
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.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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:
sort(convert(R, list)); # Robert Israel, Oct 15 2017
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Muniru A Asiru, Oct 02 2017
STATUS
approved