%I #31 Nov 21 2021 01:30:08
%S 2,3,5,7,11,13,17,19,23,29,31,41,47,53,59,71,79,83,89,97,107,127,139,
%T 149,167,179,191,199,223,239,251,269,293,349,359,383,419,431,449,479,
%U 499,503,587,599,647,719,809,839,863,881,971,1049,1151,1249,1259,1279,1399,1439,1499,1511,1567,1619,1889
%N Primes of the form 2^p * 3^q * 5^r * 7^s - 1.
%C Restricting to r = s = 0 gives A005105; s = 0 gives A293194.
%C Primes of the form A002473(k) - 1.
%H Flávio V. Fernandes, <a href="/A347977/b347977.txt">Table of n, a(n) for n = 1..10000</a>
%e 251 = 2^2 * 3^2 * 5^0 * 7^1 - 1 and 839 = 2^3 * 3^1 * 5^1 * 7^1 - 1 are terms.
%t With[{n = 2000}, Sort@ Select[Flatten@ Table[2^p * 3^q * 5^r * 7^s - 1, {p, 0, Log[2, n]}, {q, 0, Log[3, n/(2^p)]}, {r, 0, Log[5, n/(2^p * 3^q)]}, {s, 0, Log[7, n/(2^p * 3^q * 5^r)]}], PrimeQ]] (* _Amiram Eldar_, Sep 25 2021 after _Michael De Vlieger_ at A293194 *)
%o (PARI) isok(p) = isprime(p) && (vecmax(factor(p+1)[,1]) < 11); \\ _Michel Marcus_, Nov 10 2021
%o (PARI) upto(limit)={my(P=[2,3,5,7]); local(L=List()); my(recurse(k,t) = if(t<=limit+1, if(k>#P, if(isprime(t-1), listput(L,t-1)), my(b=P[k]); for(e=0, logint(limit+1,b), self()(k+1, t*b^e))))); recurse(1, 1); vecsort(Vec(L))} \\ _Andrew Howroyd_, Nov 20 2021
%Y Cf. A002473, A005105, A293194.
%K nonn
%O 1,1
%A _Flávio V. Fernandes_, Sep 21 2021