cp's OEIS Frontend

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.

A181741 Primes of the form 2^t-2^k-1, k>=1.

Original entry on oeis.org

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
Offset: 1

Views

Author

Vladimir Shevelev, Nov 08 2010

Keywords

Comments

All Mersenne primes A000668(i) are in the sequence, parametrized by t=A000043(i)+1 and k=A000043(i).
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).

Crossrefs

Cf. A010051, primes in A081118, see also A208083.

Programs

  • Haskell
    a181741 n = a181741_list !! (n-1)
    a181741_list = filter ((== 1) . a010051) a081118_list
    -- Reinhard Zumkeller, Feb 23 2012
    
  • 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 *)
  • 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<>=1
            m<<=1
    A181741_list = list(islice(A181741_gen(),30)) # Chai Wah Wu, Jul 08 2022

Formula

Conjecture: equals the intersection of A000040 and A081118 or the intersection of A000040 and A089633. [R. J. Mathar, Nov 18 2010]

Extensions

Corrected (251 and 1019 inserted) and extended by R. J. Mathar, Nov 18 2010