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.

A057331 a(n) = smallest prime p such that the first n iterates of p under x->2x+1 are all primes.

This page as a plain text file.
%I A057331 #47 Apr 03 2023 10:36:09
%S A057331 2,2,2,2,2,89,1122659,19099919,85864769,26089808579,554688278429,
%T A057331 554688278429,4090932431513069,95405042230542329
%N A057331 a(n) = smallest prime p such that the first n iterates of p under x->2x+1 are all primes.
%C A057331 For n > 10, a(n) == -1 (mod 2*3*5*11*13). - _Farideh Firoozbakht_, Apr 24 2004
%C A057331 From _Glen Whitney_, Sep 14 2022: (Start)
%C A057331 Extending Firoozbakht's observation, modulo any prime p, all residues of a(n) of the form 2^k - 1 mod p are forbidden for n greater than or equal to the number of such residues, e.g., a(n) may not be congruent to 1 or 3 mod 7 for n >= 2.
%C A057331 A067849(a(n)) >= n and for each odd a(n) that occurs in this sequence, (a(n)-1)/2 occurs in A321058. (End)
%H A057331 C. K. Caldwell, <a href="https://t5k.org/glossary/page.php?sort=CunninghamChain">Latest results about Cunningham Chains</a>
%H A057331 <a href="/index/Pri#primes_AP">Index entries for sequences related to primes in arithmetic progressions</a>
%e A057331 a(5) = 89 because the numbers 89, 179, 359, 719, 1439, 2879 are all primes and 89 is the first number to have this property.
%t A057331 f[n_] := 2n + 1; k = 1; Do[ While[ Union[ PrimeQ[ NestList[ f, Prime[k], n]]] != {True}, k++ ]; Print[ Prime[k]], {n, 1, 9} ]
%o A057331 (PARI) has(p,n)=for(k=1,n,if(!isprime(p), return(0)); p=2*p+1); isprime(p)
%o A057331 a(n)=forprime(p=2,, if(has(p,n), return(p))) \\ _Charles R Greathouse IV_, Apr 29 2015
%Y A057331 See A067849 (number of prime iterates starting from any n) and A321058 (starting points that yield record numbers of iterates).
%Y A057331 See also A005602.
%K A057331 nonn,nice,more
%O A057331 0,1
%A A057331 _Patrick De Geest_, Aug 15 2000
%E A057331 More terms from _Farideh Firoozbakht_, Apr 24 2004
%E A057331 a(11) (from the Caldwell link) sent by Peter Deleu, Hulste, Belgium, Nov 22 2004
%E A057331 a(13) added from A005602, _Paul Zimmermann_, Mar 09 2018