OFFSET
1,1
COMMENTS
In each group, p(i+1) = 2*p(i)+1.
The groups are also known as Cunningham chains of the first kind.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
The groups are:
{2, 5, 11, 23, 47},
{3, 7},
{13},
{17},
{19},
{29, 59},
{31},
{37},
{41, 83, 167},
{43},
{53, 107},
{61},
{67},
{71},
{73},
{79},
{89, 179, 359, 719, 1439, 2879},
{97},
{101},
{103},
{109},
{113, 227},
{127},
{131, 263},
{137},
{139},
...
MATHEMATICA
Block[{a = {2}, j = 1, k, p}, Do[k = j; If[PrimeQ@ a[[-1]], AppendTo[a, 2 a[[-1]] + 1], While[! FreeQ[a, Set[p, Prime[k]]], k++]; j++; Set[a, Append[a[[1 ;; -2]], p]]], 10^3]; a] (* Michael De Vlieger, Nov 17 2020 *)
PROG
(PARI) first(n) = my(res=List([2, 5, 11, 23, 47])); forprime(p=3, oo, if(!isprime((p-1)>>1), listput(res, p); c = 2*p+1; while(isprime(c), listput(res, c); c=2*c+1)); if(#res>n, return(res))); res \\ David A. Corneth, Nov 13 2021
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Zak Seidov, Oct 03 2002
EXTENSIONS
Edited by N. J. A. Sloane, Nov 13 2021
More terms from David A. Corneth, Nov 13 2021
STATUS
approved