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.

A222219 Numbers n such that n and n + 18 are prime and there is a power of two in the interval (n,n+18).

This page as a plain text file.
%I A222219 #25 Sep 08 2022 08:46:04
%S A222219 5,11,13,19,23,29,53,61,113,239,251,503,1013,1021,4093,8191,65519,
%T A222219 65521,262133,1048571,4194301,302231454903657293676533
%N A222219 Numbers n such that n and n + 18 are prime and there is a power of two in the interval (n,n+18).
%C A222219 It is a conjecture that this sequence is finite. A search around 2^n was done up to 2^1500.
%t A222219 Flatten[Table[Select[2^n-Range[17],AllTrue[{#,#+18},PrimeQ]&],{n,4,80}]]// Sort (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Oct 04 2019 *)
%o A222219 (Magma)
%o A222219 //Program finds primes separated by an even number (called gap) which
%o A222219 //have a power of two between them. Program starts with the smallest
%o A222219 //power of two above gap. Primes less than this starting point can be
%o A222219 //checked by inspection.
%o A222219 gap:=18;
%o A222219 start:=Ilog2(gap)+1;
%o A222219 for i:= start to 1000 do
%o A222219     powerof2:=2^i;
%o A222219     for k:=powerof2-gap+1 to powerof2-1 by 2 do
%o A222219         if (IsPrime(k) and IsPrime(k+gap)) then k;
%o A222219         end if;
%o A222219     end for;
%o A222219 end for;
%Y A222219 Cf. A153418, A221211.
%K A222219 nonn
%O A222219 1,1
%A A222219 _Brad Clardy_, Feb 23 2013