login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084832 Numbers k such that 2*R_k - 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k. 4
4, 18, 100, 121, 244, 546, 631, 1494, 2566, 8088 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Also numbers k such that (2*10^k-11)/9 is prime.

Larger values correspond to strong pseudoprimes.

a(11) > 10^5. - Robert Price, Sep 06 2014

LINKS

Table of n, a(n) for n=1..10.

Makoto Kamada, Prime numbers of the form 22...221.

Index entries for primes involving repunits

FORMULA

a(n) = A056660(n) + 1.

EXAMPLE

a(1) = 4 because 2*(10^4-1)/9-1 = 2221 is prime.

a(2) = 18 means that 222222222222222221 is prime.

MAPLE

select(t -> isprime(2*(10^t-1)/9-1), [$1..1000]); # Robert Israel, Sep 07 2014

MATHEMATICA

Do[ If[ PrimeQ[2(10^n - 1)/9 - 1], Print[n]], {n, 0, 7000}] (* Robert G. Wilson v, Oct 14 2004; fixed by Derek Orr, Sep 06 2014 *)

PROG

(PARI) for(n=1, 10^4, if(ispseudoprime(2*(10^n-1)/9-1), print1(n, ", "))) \\ Derek Orr, Sep 06 2014

(Python)

from sympy import isprime

def afind(limit):

  n, twoRn = 1, 2

  for n in range(1, limit+1):

    if isprime(twoRn-1): print(n, end=", ")

    twoRn = 10*twoRn + 2

afind(700) # Michael S. Branicky, Apr 18 2021

CROSSREFS

Cf. A084831, A096503-A096508, A096841-A096846, A002275, A056660.

Sequence in context: A020027 A263688 A197593 * A135177 A244309 A137958

Adjacent sequences:  A084829 A084830 A084831 * A084833 A084834 A084835

KEYWORD

more,nonn

AUTHOR

Jason Earls, Jun 05 2003

EXTENSIONS

a(8) from Labos Elemer, Jul 15 2004

a(10) from Kamada data by Robert Price, Sep 06 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 26 20:22 EDT 2022. Contains 354885 sequences. (Running on oeis4.)