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.

A262994 Smallest number k>2 such that k*2^n-1 is a prime number.

This page as a plain text file.
%I A262994 #16 Oct 11 2015 11:05:05
%S A262994 3,3,3,3,4,3,3,5,7,5,3,5,9,5,4,8,4,3,28,14,7,26,13,39,22,11,16,8,4,20,
%T A262994 10,5,6,3,24,12,6,3,25,24,12,6,3,14,7,20,10,5,19,11,21,20,10,5,3,32,
%U A262994 16,8,4,17,24,12,6,3,67,63,43,63,40,20,10,5,15,12,6,3
%N A262994 Smallest number k>2 such that k*2^n-1 is a prime number.
%C A262994 If k=2^j then n+j is a Mersenne exponent.
%C A262994 a(n)=3 if and only if 3*2^n-1 is a prime; that is, n belongs to A002235. - _Altug Alkan_, Oct 08 2015
%H A262994 Pierre CAMI, <a href="/A262994/b262994.txt">Table of n, a(n) for n = 1..10000</a>
%e A262994 3*2^1-1=5 prime so a(1)=3;
%e A262994 3*2^2-1=11 prime so a(2)=3;
%e A262994 3*2^3-1=23 prime so a(3)=3.
%t A262994 a[n_] := For[k = 3, True, k++, If[PrimeQ[k*2^n - 1], Return[k]]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Oct 07 2015 *)
%o A262994 (PARI) a(n) = {k=3; while (! isprime(k*2^n-1), k++); k;} \\ _Michel Marcus_, Oct 08 2015
%Y A262994 Cf. A247202, A002235.
%K A262994 nonn
%O A262994 1,1
%A A262994 _Pierre CAMI_, Oct 07 2015