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.

A160058 Primes whose distance to both nearest neighbor primes is not of the form 2^k.

This page as a plain text file.
%I A160058 #15 Feb 18 2019 01:55:32
%S A160058 53,157,173,211,251,257,263,293,331,337,373,509,541,547,557,563,577,
%T A160058 587,593,607,631,653,733,787,797,839,947,953,977,997,1039,1069,1103,
%U A160058 1123,1129,1181,1187,1223,1237,1249,1259,1327,1361,1367,1399,1409,1459,1471
%N A160058 Primes whose distance to both nearest neighbor primes is not of the form 2^k.
%C A160058 Intersection with A061771 yields an empty set. - _R. J. Mathar_, May 21 2009
%H A160058 Harvey P. Dale, <a href="/A160058/b160058.txt">Table of n, a(n) for n = 1..1000</a>
%H A160058 Klaus Lange, <a href="http://arxiv.org/abs/0904.4839">About a virtual subset</a>, Apr 30, 2009.
%p A160058 isA000079 := proc(n) if nops(numtheory[factorset](n)) > 1 then false; elif n mod 2 <> 0 then false; else true; fi; end: isA160058 := proc(p) o := prevprime(p) ; q := nextprime(p) ; if isprime(p) and not isA000079(q-p) and not isA000079(p-o) then true; else false; fi; end: for n from 2 to 1000 do p := ithprime(n) ; if isA160058(p) then printf("%d,",p) ; fi; od: # _R. J. Mathar_, May 21 2009
%t A160058 n2kQ[n_]:=Module[{d=Differences[n]},!IntegerQ[Log[2,First[d]]] && !IntegerQ[ Log[ 2,Last[d]]]]; Transpose[Select[Partition[Prime[ Range[ 300]],3,1],n2kQ]][[2]] (* _Harvey P. Dale_, Mar 05 2014 *)
%o A160058 (PARI) t=0;p=2;forprime(q=3,999, t*(t=q-p-1<<valuation(q-p,2)) & print1(p","); p=q)
%Y A160058 Cf. A000040. This is a proper subsequence of A137869.
%K A160058 nonn
%O A160058 1,1
%A A160058 _Jonathan Vos Post_, May 01 2009
%E A160058 More terms from _M. F. Hasler_, May 02 2008
%E A160058 Edited by _N. J. A. Sloane_, May 02 2009, based on comments from _M. F. Hasler_
%E A160058 More terms from _R. J. Mathar_, May 21 2009