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.

A113213 Smallest number m such that 2^n - m and 2^n + m are primes.

This page as a plain text file.
%I A113213 #25 Sep 09 2018 13:11:05
%S A113213 0,1,3,3,9,3,21,15,9,15,21,3,45,135,75,15,99,93,99,315,105,105,15,75,
%T A113213 339,117,261,183,351,453,1281,267,675,867,819,117,69,2343,1995,1005,
%U A113213 2949,165,741,603,315,1287,1629,243,519,765,165,1233,741,1797,339,177
%N A113213 Smallest number m such that 2^n - m and 2^n + m are primes.
%C A113213 For n>=3 all terms are multiples of 3.
%C A113213 Conjecture: a(n) = O(n^3). - _Thomas Ordowski_, Apr 20 2015
%H A113213 P. Poplin, <a href="/A113213/b113213.txt">Table of n, a(n) for n = 0..10000</a> (Terms after 8025 correspond to Fermat and Lucas PRP.)
%e A113213 a(1)=0 because 2^1 +/- 0 are primes; a(2)=1 because 2^2 -/+ 1 are primes;
%e A113213 a(33)=675 because 2^33 +/- 675 are closest (to each other) primes.
%t A113213 f[n_]:=Module[{a=2^n,i=1},While[!PrimeQ[a+i]||!PrimeQ[a-i],i++];i]; Join[{0},Rest[Array[f,80]]]  (* _Harvey P. Dale_, Apr 25 2011 *)
%o A113213 (PARI) a(n) = my(m=0); while(!(isprime(2^n+m) && isprime(2^n-m)), m++); m; \\ _Michel Marcus_, Apr 20 2015
%Y A113213 Cf. A013603, A092131.
%K A113213 nonn
%O A113213 1,3
%A A113213 _Zak Seidov_, Jan 07 2006