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.

A208091 Smallest number m such that exactly n primes of the form 2^m - 2^k - 1 exist, 1 <= k < m.

This page as a plain text file.
%I A208091 #24 Jun 14 2018 01:39:24
%S A208091 1,11,3,4,6,8,38,24,32,18,48,138,20,588,144,252,5520,168,7200,2400,
%T A208091 2850
%N A208091 Smallest number m such that exactly n primes of the form 2^m - 2^k - 1 exist, 1 <= k < m.
%C A208091 A208083(a(n)) = n and A208083(m) <> n for m < a(n).
%C A208091 a(21) > 7600, if it exists. - _Giovanni Resta_, Jun 14 2018
%e A208091 a(3) = 4 because for m = 4 there are exactly three primes of the given form: 13 = 2^4 - 2^1 - 1, 11 = 2^4 - 2^2 - 1, 7 = 2^4 - 2^3 - 1 and no smaller m satisfies this requirement.
%p A208091 f:= n -> nops(select(k -> isprime(2^n-2^k-1), [$1..n-1])):
%p A208091 for n from 1 to 300 do
%p A208091 v:= f(n);
%p A208091 if not assigned(A[v]) then A[v]:= n fi;
%p A208091 od:
%p A208091 seq(A[m],m=0..15); # _Robert Israel_, Jun 13 2018
%t A208091 A = <||>; Do[c = Length@Select[Range[n-1], PrimeQ[2^n - 2^# - 1] &]; If[! KeyExistsQ[A, c], A[c]=n], {n, 140}]; Array[A, 13, 0] (* _Giovanni Resta_, Jun 13 2018 *)
%o A208091 (Haskell)
%o A208091 import Data.List (elemIndices, elemIndex)
%o A208091 import Data.Maybe (fromJust)
%o A208091 a208091 = (+ 1) . fromJust . (`elemIndex` a208083_list)
%o A208091 (PARI) a(n) = {my(m=1); while(sum(k=1, m, isprime(2^m-2^k-1)) != n, m++); m;} \\ _Michel Marcus_, Jun 13 2018
%Y A208091 Cf. A208083.
%K A208091 nonn,more
%O A208091 0,2
%A A208091 _Reinhard Zumkeller_, Feb 23 2012
%E A208091 Corrected by _Robert Israel_, Jun 13 2018
%E A208091 a(17), a(19)-a(20) from _Robert Israel_, Jun 13 2018
%E A208091 a(16), a(18) from _Giovanni Resta_, Jun 14 2018