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.

A179289 Smallest index k such that prime(k)*2^n-1 is prime, or zero if there is no prime.

This page as a plain text file.
%I A179289 #13 Sep 16 2019 08:53:48
%S A179289 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,
%T A179289 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,
%U A179289 22,23,130,1,22,16,18,2,19,55,14,41,34,15
%N A179289 Smallest index k such that prime(k)*2^n-1 is prime, or zero if there is no prime.
%C A179289 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.
%C A179289 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
%F A179289 a(n) = 1 for n = A000043(k) - 1, the Mersenne exponents minus 1. - T. D. Noe, Mar 23 2011
%t A179289 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 *)
%o A179289 (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 /
%o A179289 (PARI) a(n) = {my(k=1); while (!isprime(prime(k)*2^n-1), k++); k;} \\ _Michel Marcus_, Sep 16 2019
%Y A179289 Cf. A126715.
%K A179289 nonn
%O A179289 1,3
%A A179289 _Pierre CAMI_, Jul 09 2010