OFFSET
1,3
EXAMPLE
a(3) = 21: M(3) = 2^5-1 = 31; M(4) = 2^7-1 = 127; M(5) = 2^13-1 = 8191; 2*21*31*127*8191-1 = 1354414613, which is prime.
MATHEMATICA
spi[n_]:=Module[{k=2}, While[!PrimeQ[k*n-1], k+=2]; k/2]; spi/@Times@@@ Partition[ Select[2^Range[5000]-1, PrimeQ], 3, 1] (* The program generates the first 18 terms of the sequence. To generate more terms, increase the Range specification constant, but the program may take a long time to run. *) (* Harvey P. Dale, Dec 09 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ray G. Opao, Apr 21 2004
STATUS
approved