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.

A186169 Consider two consecutive primes {p,q} such that {P=2p-q,Q=2q-p} are both prime. Sequence gives lesser primes p.

This page as a plain text file.
%I A186169 #17 Apr 14 2015 14:45:48
%S A186169 47,257,607,619,647,1097,1459,1499,1709,1747,1889,2677,2861,3307,3559,
%T A186169 4007,5107,5387,5419,6317,6367,7309,7829,9467,10079,10639,11789,12589,
%U A186169 12647,12721,13457,14747,15149,15749,15797,15889,15907,17477,17839,18217,19477
%N A186169 Consider two consecutive primes {p,q} such that {P=2p-q,Q=2q-p} are both prime. Sequence gives lesser primes p.
%C A186169 Note that Q-P=3(q-p).
%C A186169 No common terms with A181848.
%H A186169 Zak Seidov, <a href="/A186169/b186169.txt">Table of n, a(n) for n = 1..1000</a>
%e A186169 a(1)=47 because p=47, q=53 and {P=41,Q=59} are both prime.
%t A186169 a = 2; Reap[ Do[b = Prime[n]; If[PrimeQ[2*a - b] && PrimeQ[2*b - a], Sow[a]]; a = b, {n, 2, 1000}]][[2, 1]]
%t A186169 Transpose[Select[Partition[Prime[Range[2500]],2,1],AllTrue[{2#[[1]]- #[[2]], 2#[[2]]-#[[1]]},PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Apr 14 2015 *)
%Y A186169 Cf. A181848.
%K A186169 nonn
%O A186169 1,1
%A A186169 _Zak Seidov_, Aug 18 2012