This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A178491 #10 Feb 21 2024 08:27:06 %S A178491 7,17,31,53,97,127,241,337,577,1249,3361,3697,4373,4801,6961,8191, %T A178491 10657,13121,23761,25537,31249,32257,33613,37537,49297,59581,64081, %U A178491 65521,77617,79201,89041,126001,131071,138337,153457,159013,171697,193441 %N A178491 Primes of the form 2*p^k-1, where p is prime and k > 1. %C A178491 Includes the Mersenne primes > 3 (A000668) and primes of the form 2p^2-1 (A092057) as subsequences. Its union with A005383 gives A178490. %H A178491 Robert Israel, <a href="/A178491/b178491.txt">Table of n, a(n) for n = 1..10000</a> %e A178491 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 A178491 N:= 10^6: # for terms <= N %p A178491 P:= select(isprime,[2,seq(i,i=3..floor(sqrt((N+1)/2)),2)]): %p A178491 R:= NULL: %p A178491 for p in P do %p A178491 for k from 2 do %p A178491 v:= 2*p^k-1; %p A178491 if v > N then break fi; %p A178491 if isprime(v) then R:= R,v fi; %p A178491 od od: %p A178491 sort([R]); # _Robert Israel_, Feb 20 2024 %t A178491 Select[Prime[Range[20000]],!PrimeQ[(#+1)/2]&&Length[FactorInteger[(#+1)/2]]==1&] %o A178491 (PARI) is_A178491(n) = isprime(n) & ispower((n+1)/2,,&n) & isprime(n) %Y A178491 Cf. A000668, A005383, A092057, A178490. %K A178491 nonn %O A178491 1,1 %A A178491 _Farideh Firoozbakht_ and _M. F. Hasler_, Oct 09 2010