login
A179289
Smallest index k such that prime(k)*2^n-1 is prime, or zero if there is no prime.
1
1, 1, 2, 1, 4, 1, 2, 3, 4, 3, 2, 1, 11, 3, 22, 1, 4, 1, 18, 7, 4, 23, 6, 23, 18, 5, 44, 23, 4, 1, 14, 3, 11, 2, 11, 7, 11, 2, 18, 28, 8, 16, 2, 102, 4, 9, 11, 3, 8, 5, 174, 24, 63, 3, 2, 103, 22, 23, 130, 1, 22, 16, 18, 2, 19, 55, 14, 41, 34, 15
OFFSET
1,3
COMMENTS
Define partial sum S(N)=Sum(n=1...N) of n , T(N)=Sum(n=1...N) of k(n) The ratio T(N)/S(N) --> approx 0.5236 as N --> infinity.
It is conjectured that a(42228) is the first 0 term. This corresponds to the first Riesel number, 509203, which happens to be prime. See A101036. - T. D. Noe, Mar 23 2011
FORMULA
a(n) = 1 for n = A000043(k) - 1, the Mersenne exponents minus 1. - T. D. Noe, Mar 23 2011
MATHEMATICA
sik[n_]:=Module[{c=2^n, k=1}, While[!PrimeQ[Prime[k]*c-1], k++]; k]; Array[ sik, 70] (* The program will NOT identify cases where no prime satisfies the definition. See the second comment. *) (* Harvey P. Dale, Jan 10 2016 *)
PROG
(Other) SCRIPT / DIM nn, 0 / DIM kk / DIMS st / LABEL loopn / SET nn, nn+1 / IF nn>10000 THEN END / SET kk, 0 / LABEL loopk / SET kk, kk+1 / SET st, %d, %d, %d\,; nn; kk; p(kk) / PRP p(kk)*2^nn-1 / IF ISPRIME THEN GOTO loopn / GOTO loopk / / This file is the in.txt file / The command is PFGW -f in.txt / The results are in the file pfgw-prime.log for small n / and in the pfgw.log file for greatest n / Program PFGW from Primeform Group /
(PARI) a(n) = {my(k=1); while (!isprime(prime(k)*2^n-1), k++); k; } \\ Michel Marcus, Sep 16 2019
CROSSREFS
Cf. A126715.
Sequence in context: A105584 A072064 A105498 * A083414 A334890 A171174
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 09 2010
STATUS
approved