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.

Showing 1-10 of 22 results. Next

A005384 Sophie Germain primes p: 2p+1 is also prime.

Original entry on oeis.org

2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113, 131, 173, 179, 191, 233, 239, 251, 281, 293, 359, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 719, 743, 761, 809, 911, 953, 1013, 1019, 1031, 1049, 1103, 1223, 1229, 1289, 1409, 1439, 1451, 1481, 1499, 1511, 1559
Offset: 1

Views

Author

Keywords

Comments

Then 2p+1 is called a safe prime: see A005385.
Primes p such that the equation phi(x) = 2p has solutions, where phi is the totient function. See A087634 for another such collection of primes. - T. D. Noe, Oct 24 2003
Subsequence of A117360. - Reinhard Zumkeller, Mar 10 2006
Let q = 2n+1. For these n (and q), the difference of two cyclotomic polynomials can be written as a cyclotomic polynomial in x^2: Phi(q,x) - Phi(2q,x) = 2x Phi(n,x^2). - T. D. Noe, Jan 04 2008
A Sophie Germain prime p is 2, 3 or of the form 6k-1, k >= 1, i.e., p = 5 (mod 6). A prime p of the form 6k+1, k >= 1, i.e., p = 1 (mod 6), cannot be a Sophie Germain prime since 2p+1 is divisible by 3. - Daniel Forgues, Jul 31 2009
Also solutions to the equation: floor(4/A000005(2*n^2+n)) = 1. - Enrique Pérez Herrero, May 03 2012
In the spirit of the conjecture related to A217788, we conjecture that for any integers n >= m > 0 there are infinitely many integers b > a(n) such that the number Sum_{k=m..n} a(k)*b^(n-k) is prime. - Zhi-Wei Sun, Mar 26 2013
If k is the product of a Sophie Germain prime p and its corresponding safe prime 2p+1, then a(n) = (k-phi(k))/3, where phi is Euler's totient function. - Wesley Ivan Hurt, Oct 03 2013
Giovanni Resta found the first Sophie Germain prime which is also a Brazilian number (A125134), 28792661 = 1 + 73 + 73^2 + 73^3 + 73^4 = (11111)73. - _Bernard Schott, Mar 07 2019
For all Sophie Germain primes p >= 5, 2*p + 1 = min(A, B) where A is the smallest prime factor of 2^p - 1 and B the smallest prime factor of (2^p + 1) / 3. - Alain Rocchelli, Feb 01 2023
Consider a pair of numbers (p, 2*p+1), with p >= 3. Then p is a Sophie Germain prime iff (p-1)!^2 + 6*p == 1 (mod p*(2*p+1)). - Davide Rotondo, May 02 2024

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • A. Peretti, The quantity of Sophie Germain primes less than x, Bull. Number Theory Related Topics, Vol. 11, No. 1-3 (1987), pp. 81-92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 76, 227-230.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 83.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.

Crossrefs

Cf. also A000355, A156541, A156542, A156592, A161896, A156660, A156874, A092816, A023212, A007528 (primes of the form 6k-1).
For primes p that remains prime through k iterations of the function f(x) = 2x + 1: this sequence (k=1), A007700 (k=2), A023272 (k=3), A023302 (k=4), A023330 (k=5), A278932 (k=6), A138025 (k=7), A138030 (k=8).

Programs

  • GAP
    Filtered([1..1600],p->IsPrime(p) and IsPrime(2*p+1)); # Muniru A Asiru, Mar 06 2019
    
  • Magma
    [ p: p in PrimesUpTo(1560) | IsPrime(2*p+1) ]; // Klaus Brockhaus, Jan 01 2009
    
  • Maple
    A:={}: for n from 1 to 246 do if isprime(2*ithprime(n)+1) then A:=A union {ithprime(n)} fi od: A:=A; # Emeric Deutsch, Dec 09 2004
  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[2#+1]&]
    lst = {}; Do[If[PrimeQ[n + 1] && PrimeOmega[n] == 2, AppendTo[lst, n/2]], {n, 2, 10^4}]; lst (* Hilko Koning, Aug 17 2021 *)
  • PARI
    select(p->isprime(2*p+1), primes(1000)) \\ In old PARI versions <= 2.4.2, use select(primes(1000), p->isprime(2*p+1)).
    
  • PARI
    forprime(n=2, 10^3, if(ispseudoprime(2*n+1), print1(n, ", "))) \\ Felix Fröhlich, Jun 15 2014
    
  • PARI
    is_A005384=(p->isprime(2*p+1)&&isprime(p));
      {A005384_vec(N=100,p=1)=vector(N,i,until(isprime(2*p+1),p=nextprime(p+1));p)} \\ M. F. Hasler, Mar 03 2020
    
  • Python
    from sympy import isprime, nextprime
    def ok(p): return isprime(2*p+1)
    def aupto(limit): # only test primes
      alst, p = [], 2
      while p <= limit:
        if ok(p): alst.append(p)
        p = nextprime(p)
      return alst
    print(aupto(1559)) # Michael S. Branicky, Feb 03 2021

Formula

a(n) mod 10 <> 7. - Reinhard Zumkeller, Feb 12 2009
A156660(a(n)) = 1; A156874 gives numbers of Sophie Germain primes <= n. - Reinhard Zumkeller, Feb 18 2009
tau(4*a(n) + 2) = tau(4*a(n)) - 2, for n > 1. - Arkadiusz Wesolowski, Aug 25 2012
eulerphi(4*a(n) + 2) = eulerphi(4*a(n)) + 2, for n > 1. - Arkadiusz Wesolowski, Aug 26 2012
A005097 INTERSECT A000040. - R. J. Mathar, Mar 23 2017
Sum_{n>=1} 1/a(n) is in the interval (1.533944198, 1.8026367) (Wagstaff, 2021). - Amiram Eldar, Nov 04 2021
a(n) >> n log^2 n. - Charles R Greathouse IV, Jul 25 2024

A005385 Safe primes p: (p-1)/2 is also prime.

Original entry on oeis.org

5, 7, 11, 23, 47, 59, 83, 107, 167, 179, 227, 263, 347, 359, 383, 467, 479, 503, 563, 587, 719, 839, 863, 887, 983, 1019, 1187, 1283, 1307, 1319, 1367, 1439, 1487, 1523, 1619, 1823, 1907, 2027, 2039, 2063, 2099, 2207, 2447, 2459, 2579, 2819, 2879, 2903, 2963
Offset: 1

Views

Author

Keywords

Comments

Then (p-1)/2 is called a Sophie Germain prime: see A005384.
Or, primes of the form 2p+1 where p is prime.
Primes p such that denominator(Bernoulli(p-1) + 1/p) = 6. - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 10 2004
Primes p such that p-1 is a semiprime. - Zak Seidov, Jul 01 2005
A156659(a(n)) = 1; A156875 gives numbers of safe primes <= n. - Reinhard Zumkeller, Feb 18 2009
From Daniel Forgues, Jul 31 2009: (Start)
A safe prime p is 7 or of the form 6k-1, k >= 1, i.e., p == 5 (mod 6).
A prime p of the form 6k+1, k >= 2, i.e., p = 1 (mod 6), cannot be a safe prime since (p-1)/2 is composite and divisible by 3. (End)
If k is the product of the n-th safe prime p and its corresponding Sophie Germain prime (p-1)/2, then a(n) = 2(k-phi(k))/3 + 1, where phi is Euler's totient function. - Wesley Ivan Hurt, Oct 03 2013
From Bob Selcoe, Apr 14 2014: (Start)
When the n-th prime is divided by all primes up to the (n-1)-th prime, safe primes (p) have remainders of 1 when divided by 2 and (p-1)/2 and no other primes. That is, p(mod j)=1 iff j={2,(p-1)/2}; p>j, {p,j}=>prime. Explanation: Generally, x(mod y)=1 iff x=y'+1, where y' is the set of divisors of y, y'>1. Since safe primes (p) are of the form p(mod j)=1 iff p and j are prime, then j={j'}. That is, since j is prime, there are no divisors of j (greater than 1) other than j. Therefore, no primes other than j exist which satisfy the equation p(mod j)=1.
Except primes of the form 2^n+1 (n>=0), all non-safe primes (p') will have at least one prime (p") greater than 2 and less than (p-1)/2 such that p'(mod p")=1. Explanation: Non-safe primes (p') are of the form p'(mod k)=1 where k is composite. This means prime divisors of k exist, and p" is the set of prime divisors of k (example p'=89: k=44; p"={2,11}). The exception applies because p"={2} iff p'=2^n+1.
Refer to the rows in triangle A207409 for illustration and further explanation. (End)
Conjecture: there is a strengthening of the Bertrand postulate for n >= 24: the interval (n, 2*n) contains a safe prime. It has been tested by Peter J. C. Moses up to n = 10^7. - Vladimir Shevelev, Jul 06 2015
The six known safe primes p such that (p-1)/2 is a Fibonacci prime are in A263880. - Jonathan Sondow, Nov 04 2015
The only term in common with A005383 is 5. - Zak Seidov, Dec 31 2015
From the fourth entry onward, do these correspond to Smarandache's problem 34 (see A007931 link), specifically values which cannot be used (do not meet conditions) to confirm the conjecture? - Bill McEachen, Sep 29 2016
Primes p with the property that there is a prime q such that p+q^2 is a square. - Zak Seidov, Feb 16 2017
It is conjectured that there are infinitely many safe primes, and their estimated asymptotic density ~ 2C/(log n)^2 (where C = 0.66... is the twin prime constant A005597) converges to the actual value as far as we know. - M. F. Hasler, Jun 14 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Except for the initial term, this is identical to A079148.
Subsequence of A088707.
Primes in A072055.

Programs

  • Haskell
    a005385 n = a005385_list !! (n-1)
    a005385_list = filter ((== 1) . a010051 . (`div` 2)) a000040_list
    -- Reinhard Zumkeller, Sep 18 2011
    
  • Magma
    [p: p in PrimesUpTo(3000) | IsPrime((p-1) div 2)]; // Vincenzo Librandi, Jul 06 2015
    
  • Maple
    with(numtheory); [ seq(safeprime(i),i=1..3000) ]: convert(%,set); convert(%,list); sort(%);
    A005385_list := n->select(i->isprime(iquo(i,2)),select(i->isprime(i),[$1..n])): # Peter Luschny, Nov 08 2010
  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[(#-1)/2]&] (* Zak Seidov, Jan 26 2011 *)
  • PARI
    g(n) = forprime(x=2,n,y=x+x+1;if(isprime(y),print1(y","))) \\ Cino Hilliard, Sep 12 2004
    
  • PARI
    [x|x<-primes(10^3), bigomega(x-1)==2] \\ Altug Alkan, Nov 04 2015
    
  • Python
    from sympy import isprime, primerange
    def aupto(limit):
      alst = []
      for p in primerange(1, limit+1):
        if isprime((p-1)//2): alst.append(p)
      return alst
    print(aupto(2963)) # Michael S. Branicky, May 07 2021

Formula

a(n) = 2 * A005384(n) + 1.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 15 2001

A007700 Numbers n such that n, 2n+1, and 4n+3 all prime.

Original entry on oeis.org

2, 5, 11, 41, 89, 179, 359, 509, 719, 1019, 1031, 1229, 1409, 1451, 1481, 1511, 1811, 1889, 1901, 1931, 2459, 2699, 2819, 3449, 3491, 3539, 3821, 3911, 5081, 5399, 5441, 5849, 6101, 6131, 6449, 7079, 7151, 7349, 7901, 8969, 9221, 10589, 10691, 10709, 11171
Offset: 1

Views

Author

Keywords

Comments

The corresponding primes 2n+1 and 4n+3 respectively have n-1 and 2n primitive roots. - Lekraj Beedassy, Jan 07 2005
At n > 2, a(n) == {11,29} (mod 30). - Zak Seidov, Jan 31 2013

References

  • T. Moreau, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Intersection of A005384 and A023213.

Programs

  • Maple
    A007700 := proc(n) local p1,p2; p1 := 2*n+1; p2 := 2*p1+1; if isprime(n) = true and isprime(p1)=true and isprime(p2)=true then RETURN(n); fi; end;
  • Mathematica
    Select[Range[10^3*3], PrimeQ[ # ]&&PrimeQ[2*#+1]&&PrimeQ[4*#+3] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Prime[Range[1500]],AllTrue[{2#+1,4#+3},PrimeQ]&] (* Harvey P. Dale, Apr 12 2022 *)
  • PARI
    is(n)=isprime(n)&&isprime(2*n+1)&&isprime(4*n+3) \\ Charles R Greathouse IV, Mar 21 2013

A005602 Smallest prime beginning a complete Cunningham chain of length n (of the first kind).

Original entry on oeis.org

13, 3, 41, 509, 2, 89, 1122659, 19099919, 85864769, 26089808579, 665043081119, 554688278429, 4090932431513069, 95405042230542329, 90616211958465842219, 810433818265726529159
Offset: 1

Views

Author

Keywords

Comments

The word "complete" indicates each chain is exactly n primes long (i.e., the chain cannot be a subchain of another one). Except for a(1), each term, by definition, is a Sophie Germain prime (A005384) as is each element except the last in each chain; each element after the first in each chain is a safe prime (A005385), so interior elements are both.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

a(13) found by Jack Brennen; a(14) found by Paul Jobling (Paul.Jobling(AT)WhiteCross.com) [Oct 23 2000]
Better description from Rick L. Shepherd, Jul 07 2004
a(15) found by Jonathan Webster and Jonathan Sorenson, added Jun 26 2018
a(16) found by Phil Carmody and Paul Jobling, Feb 2002, and added by Mauro Fiorentini, Feb 21 2025

A023272 Primes that remain prime through 3 iterations of the function f(x) = 2*x + 1.

Original entry on oeis.org

2, 5, 89, 179, 359, 509, 1229, 1409, 2699, 3539, 6449, 10589, 11549, 11909, 12119, 17159, 19709, 19889, 22349, 26189, 27479, 30389, 43649, 53639, 53849, 55229, 57839, 60149, 61409, 63419, 66749, 71399, 74699, 75329, 82499, 87539, 98369, 101399, 104369
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 2*p+1, 4*p+3 and 8*p+7 are also primes. - Vincenzo Librandi, Aug 04 2010
For n > 2, a(n) == 29 (mod 30). - Zak Seidov, Jan 31 2013

Crossrefs

Intersection of A007700 and A023231.

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and IsPrime(2*n+1) and IsPrime(4*n+3) and IsPrime(8*n+7)] // Vincenzo Librandi, Aug 04 2010
    
  • Maple
    p:=2: for n from 1 to 5000 do if(isprime(2*p+1) and isprime(4*p+3) and isprime(8*p+7))then printf("%d, ",p): fi: p:=nextprime(p): od: # Nathaniel Johnston, Jun 30 2011
  • Mathematica
    Select[Prime[Range[10^3*4]], PrimeQ[a1=2*#+1] && PrimeQ[a2=2*a1+1] && PrimeQ[a3=2*a2+1] &] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Join[{2, 5}, Select[Range[89, 104369, 30], PrimeQ[#] && PrimeQ[2*# + 1] && PrimeQ[4*# + 3] && PrimeQ[8*# + 7] &]] (* Zak Seidov, Jan 31 2013 *)
    p3iQ[n_]:=AllTrue[NestList[2#+1&,n,3],PrimeQ]; Join[{2,5},Select[ Range[ 89,200000,30],p3iQ]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 30 2019 *)
  • PARI
    is(n)=isprime(n)&&isprime(2*n+1)&&isprime(4*n+3)&&isprime(8*n+7) \\ Charles R Greathouse IV, Mar 21 2013

A023330 Primes that remain prime through 5 iterations of function f(x) = 2x + 1.

Original entry on oeis.org

89, 63419, 127139, 405269, 810809, 1069199, 1122659, 1178609, 1333889, 1598699, 1806089, 1958249, 2164229, 2245319, 2329469, 2606069, 2848949, 3241289, 3339989, 3784199, 3962039, 4088879, 4328459, 4444829, 4658939, 4664249, 4894889, 4897709, 5132999
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 2*p+1, 4*p+3, 8*p+7, 16*p+15 and 32*p+31 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Programs

  • Magma
    [n: n in [1..5000000] | forall{2^i*n+2^i-1: i in [0..5] | IsPrime(2^i*n+2^i-1)}]; // Vincenzo Librandi, Aug 04 2010
    
  • Mathematica
    Select[Prime[Range[10^5]], PrimeQ[a1=2*#+1] && PrimeQ[a2=2*a1+1] && PrimeQ[a3=2*a2+1] && PrimeQ[a4=2*a3+1] && PrimeQ[a5=2*a4+1] &] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
  • PARI
    is(n)=isprime(n) && isprime(2*n+1) && isprime(4*n+3) && isprime(8*n+7) && isprime(16*n+15) && isprime(32*n+31) \\ Charles R Greathouse IV, Jul 01 2013
    
  • Python
    from sympy import prime, isprime
    A023330_list = [p for p in (prime(n) for n in range(1,10**5)) if all([isprime(2**m*(p+1)-1) for m in range(1,6)])] # Chai Wah Wu, Sep 09 2014

Formula

a(n) == 29 (mod 30). - Zak Seidov, Jan 31 2013

A023302 Primes that remain prime through 4 iterations of function f(x) = 2x + 1.

Original entry on oeis.org

2, 89, 179, 53639, 53849, 61409, 63419, 66749, 126839, 127139, 143609, 167729, 186149, 206369, 254279, 268049, 296099, 340919, 405269, 422069, 446609, 539009, 594449, 607319, 658349, 671249, 725009, 775949, 810539, 810809, 812849, 819509
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 2*p+1, 4*p+3, 8*p+7 and 16*p+15 are also primes. - Vincenzo Librandi, Aug 04 2010
For n > 1, a(n) == 29 (mod 30). One should use it in codes. - Zak Seidov, Jan 31 2013

Crossrefs

Programs

  • Magma
    [n: n in [1..1200000] | IsPrime(n) and IsPrime(2*n+1) and IsPrime(4*n+3) and IsPrime(8*n+7) and IsPrime(16*n+15)] // Vincenzo Librandi, Aug 04 2010
    
  • Mathematica
    Select[Prime[Range[10^4*4]], PrimeQ[a1=2*#+1] && PrimeQ[a2=2*a1+1] && PrimeQ[a3=2*a2+1] && PrimeQ[a4=2*a3+1] &] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Join[{2},Select[Range[29,820000,30],And@@PrimeQ[NestList[2#+1&,#,4]]&]] (* Harvey P. Dale, Apr 03 2013 *)
  • PARI
    is(n)=isprime(n) && isprime(2*n+1) && isprime(4*n+3) && isprime(8*n+7) && isprime(16*n+15) \\ Charles R Greathouse IV, Jul 01 2013

A005603 Smallest prime beginning a complete Cunningham chain (of the second kind) of length n.

Original entry on oeis.org

11, 7, 2, 2131, 1531, 385591, 16651, 15514861, 857095381, 205528443121, 1389122693971, 216857744866621, 758083947856951, 107588900851484911, 69257563144280941, 3203000719597029781
Offset: 1

Views

Author

Keywords

Comments

The chain begins with a prime number p; next term p' (a prime) is produced forming 2p-1; next term p"=2p'-1, etc. "Complete" means that each chain is exactly n primes long (i.e. the chain cannot be a subchain of another one). That is why this sequence is slightly different from A064812, where the 6th term (33301) is smaller than here (385591) but is the second one of a seven primes sequence and therefore doesn't *start* a sequence.
According to Augustin's web site, the numbers 107588900851484911, 69257563144280941, 3203000719597029781 are also in the sequence. - Dmitry Kamenetsky, May 14 2009

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A064812 for another version.

Extensions

6th term corrected from 385591 on Feb 23 1995, at Robert G. Wilson v's suggestion
a(14) and a(15) found by Paul Jobling (Paul.Jobling(AT)WhiteCross.com) [Oct 23 2000]
a(6) reverted to original value by Sean A. Irvine, Jul 10 2016
a(16) from Augustin's page, comment corrected by Jens Kruse Andersen, Jun 14 2014
Edited by N. J. A. Sloane, Nov 03 2018 at the suggestion of Georg Fischer, Nov 03 2018, merging a duplicate entry with this one.
In Augustin's web page there are 7 or so more terms which could be added here, or alternatively used to create a b-file. - Georg Fischer, Nov 03 2018

A084954 Initial prime of a prime chain of length n under the iteration x->2x+3.

Original entry on oeis.org

2, 2, 2, 2, 47, 47, 6047, 477727, 30596497, 3388516667, 340746580567, 1763093883977, 773521306107547, 1142275515892937, 391230854658184967
Offset: 1

Views

Author

W. Edwin Clark, Jun 14 2003

Keywords

Comments

This is a special case of prime chains generated by f(x) = cx + d.
Is it smallest initial prime of a prime chain of length n under the iteration x->2x+3, or not? At least up to 3388516667 it is the smallest one. - Zak Seidov, Dec 20 2013

Examples

			a(3) = 2 since 2, 2*2+3=7 and 2*7+3=17 are primes.
		

Crossrefs

Extensions

More terms from Don Reble, Nov 07 2007
a(15) from Bert Dobbelaere, Jun 01 2025

A083388 a(n) = beginning of a run of at least n primes when x -> 3*x + 2 is iterated.

Original entry on oeis.org

2, 3, 5, 29, 1129, 10009, 575119, 32694619, 586130089, 1030544269, 427744892959, 18736892249459, 221530676461709, 221530676461709
Offset: 1

Views

Author

W. Edwin Clark, Jun 09 2003

Keywords

Comments

a(11) > 8695354111. - Donovan Johnson, Sep 27 2008

Examples

			a(3) = 5 because 5 is the beginning of 3 primes in succession: 5, 3*5 + 2 = 17 is prime and 3*17 + 2 = 53 is prime.
		

Crossrefs

Programs

  • Mathematica
    c[p_] := Block[{k=1, q = 3 p + 2}, While[PrimeQ[q], q = 3 q + 2; k++]; k]; a[n_] := Block[{p=2}, While[c[p] < n, p = NextPrime[p]]; p]; Array[a, 7] (* Giovanni Resta, Mar 21 2017 *)
  • PARI
    mx=1; forprime(p=1,198000,x=p; m=0; while(isprime(x=3*x+2),m=m+1; if(m>mx,print(p," ",m, " ",x); mx=m,))) \\ Donald S. McDonald, Jun 11 2003

Extensions

a(8)-a(10) from Donovan Johnson, Sep 27 2008
a(11)-a(12) from John Cerkan, Jan 09 2017
a(13)-a(14) from Giovanni Resta, Mar 21 2017
Showing 1-10 of 22 results. Next