%I #10 Feb 21 2024 08:27:06
%S 7,17,31,53,97,127,241,337,577,1249,3361,3697,4373,4801,6961,8191,
%T 10657,13121,23761,25537,31249,32257,33613,37537,49297,59581,64081,
%U 65521,77617,79201,89041,126001,131071,138337,153457,159013,171697,193441
%N Primes of the form 2*p^k-1, where p is prime and k > 1.
%C Includes the Mersenne primes > 3 (A000668) and primes of the form 2p^2-1 (A092057) as subsequences. Its union with A005383 gives A178490.
%H Robert Israel, <a href="/A178491/b178491.txt">Table of n, a(n) for n = 1..10000</a>
%e a(1) = 7 = 2*2^2-1 and a(2) = 17 = 2*3^2-1 are also in A092057, and a(3) = 31 = 2*2^4-1 = A000668(3), but a(4) = 53 = 2*3^3-1 is in neither of these subsequences.
%p N:= 10^6: # for terms <= N
%p P:= select(isprime,[2,seq(i,i=3..floor(sqrt((N+1)/2)),2)]):
%p R:= NULL:
%p for p in P do
%p for k from 2 do
%p v:= 2*p^k-1;
%p if v > N then break fi;
%p if isprime(v) then R:= R,v fi;
%p od od:
%p sort([R]); # _Robert Israel_, Feb 20 2024
%t Select[Prime[Range[20000]],!PrimeQ[(#+1)/2]&&Length[FactorInteger[(#+1)/2]]==1&]
%o (PARI) is_A178491(n) = isprime(n) & ispower((n+1)/2,,&n) & isprime(n)
%Y Cf. A000668, A005383, A092057, A178490.
%K nonn
%O 1,1
%A _Farideh Firoozbakht_ and _M. F. Hasler_, Oct 09 2010