The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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, 262603, 282948, 359860 (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
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
Sequence in context: A020027 A263688 A197593 * A135177 A244309 A137958
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
a(11)-a(13) from Kamada data by Tyler Busby, Apr 29 2024
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 May 24 16:32 EDT 2024. Contains 372781 sequences. (Running on oeis4.)