|
|
A181741
|
|
Primes of the form 2^t-2^k-1, k>=1.
|
|
6
|
|
|
3, 5, 7, 11, 13, 23, 29, 31, 47, 59, 61, 127, 191, 223, 239, 251, 383, 479, 503, 509, 991, 1019, 1021, 2039, 3583, 3967, 4079, 4091, 4093, 6143, 8191, 15359, 16127, 16319, 16381, 63487, 65407, 65519, 129023, 131063, 131071, 245759, 253951, 261631, 261887, 262079, 262111, 262127, 262139
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
If p is in the sequence, then the exponents t and k are unique.
For given k, the smallest value of t defines sequence A181692.
Every term p=2^t-2^k-1 in this sequence here generates an entry 2^(t-1)*p in A181595 (cf. A181701).
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
isA000079 := proc(n) if n = 1 then true; elif type(n, 'odd') then false; else if nops( numtheory[factorset](n) ) = 1 then true; else
false; end if; end if; end proc:
isA181741 := proc(p) if isprime(p) then k := A007814(p+1) ; (p+1)/2^k+1 ; return ( isA000079(%) and k >=1 ) ; else
false; end if; end proc:
for i from 1 to 1000 do p := ithprime(i) ; if isA181741(p) then printf("%d, ", p) ; end if; end do: # R. J. Mathar, Nov 18 2010
|
|
MATHEMATICA
|
Select[Table[2^t-2^k-1, {t, 1, 20}, {k, 1, t-1}] // Flatten // Union, PrimeQ] (* Jean-François Alcover, Nov 16 2017 *)
|
|
PROG
|
(Haskell)
a181741 n = a181741_list !! (n-1)
a181741_list = filter ((== 1) . a010051) a081118_list
(PARI) lista(nn) = {for (n=3, nn, forstep(k=n-1, 1, -1, if (isprime(p=2^n-2^k-1), print1(p, ", ")); ); ); } \\ Michel Marcus, Dec 17 2018
(Python)
from itertools import count, islice
from sympy import isprime
def A181741_gen(): # generator of terms
m = 2
for t in count(1):
r=1<<t-1
for k in range(t-1, 0, -1):
if isprime(s:=m-r-1):
yield s
r>>=1
m<<=1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected (251 and 1019 inserted) and extended by R. J. Mathar, Nov 18 2010
|
|
STATUS
|
approved
|
|
|
|