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.

A084832 Numbers k such that 2*R_k - 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

This page as a plain text file.
%I A084832 #49 Apr 29 2024 09:30:30
%S A084832 4,18,100,121,244,546,631,1494,2566,8088,262603,282948,359860
%N A084832 Numbers k such that 2*R_k - 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k.
%C A084832 Also numbers k such that (2*10^k-11)/9 is prime.
%C A084832 Larger values correspond to strong pseudoprimes.
%C A084832 a(11) > 10^5. - _Robert Price_, Sep 06 2014
%H A084832 Makoto Kamada, <a href="https://stdkmd.net/nrr/2/22221.htm#prime">Prime numbers of the form 22...221</a>.
%H A084832 <a href="/index/Pri#Pri_rep">Index entries for primes involving repunits</a>
%F A084832 a(n) = A056660(n) + 1.
%e A084832 a(1) = 4 because 2*(10^4-1)/9-1 = 2221 is prime.
%e A084832 a(2) = 18 means that 222222222222222221 is prime.
%p A084832 select(t -> isprime(2*(10^t-1)/9-1),[$1..1000]); # _Robert Israel_, Sep 07 2014
%t A084832 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 *)
%o A084832 (PARI) for(n=1, 10^4, if(ispseudoprime(2*(10^n-1)/9-1), print1(n,", "))) \\ _Derek Orr_, Sep 06 2014
%o A084832 (Python)
%o A084832 from sympy import isprime
%o A084832 def afind(limit):
%o A084832   n, twoRn = 1, 2
%o A084832   for n in range(1, limit+1):
%o A084832     if isprime(twoRn-1): print(n, end=", ")
%o A084832     twoRn = 10*twoRn + 2
%o A084832 afind(700) # _Michael S. Branicky_, Apr 18 2021
%Y A084832 Cf. A084831, A096503-A096508, A096841-A096846, A002275, A056660.
%K A084832 more,nonn
%O A084832 1,1
%A A084832 _Jason Earls_, Jun 05 2003
%E A084832 a(8) from _Labos Elemer_, Jul 15 2004
%E A084832 a(10) from Kamada data by _Robert Price_, Sep 06 2014
%E A084832 a(11)-a(13) from Kamada data by _Tyler Busby_, Apr 29 2024