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.

A178421 Lower primes p1 in a twin pair such that sum of p1 and p2 yields average a1 of twin prime pairs and product of 2*a1 is another average of twin prime pairs.

This page as a plain text file.
%I A178421 #15 Nov 02 2023 07:50:29
%S A178421 211049,248639,253679,410339,507359,605639,1121189,1138829,1262099,
%T A178421 2162579,2172869,2277659,4070219,6305459,7671509,11659409,12577109,
%U A178421 14203769,14862119,17472839,18728639,18798359,20520569,21140699
%N A178421 Lower primes p1 in a twin pair such that sum of p1 and p2 yields average a1 of twin prime pairs and product of 2*a1 is another average of twin prime pairs.
%C A178421 The definition means that a1/2, a1 and 2*a1 are all in A014574 (twin prime averages). - _R. J. Mathar_, Nov 02 2023
%H A178421 Amiram Eldar, <a href="/A178421/b178421.txt">Table of n, a(n) for n = 1..10000</a>
%F A178421 a(n) = A069175(n)-1. - _R. J. Mathar_, Nov 02 2023
%e A178421 211049 is a term since 211049 and 211051 are twin primes; 211049 + 211051 = 422100 is an average of twin primes, and 2*422100 = 844200 is another average of twin primes.
%t A178421 lst={};Do[p1=Prime[n];p2=Prime[n+1];a1=p1+p2;a2=2*a1;If[p2-p1==2&&PrimeQ[a1-1]&&PrimeQ[a1+1]&&PrimeQ[a2-1]&&PrimeQ[a2+1],AppendTo[lst,p1]],{n,10!}];lst
%t A178421 atpQ[{a_,b_}]:=Module[{m=a+b},b-a==2&&AllTrue[m+{1,-1},PrimeQ] && AllTrue[ 2m+{1,-1},PrimeQ]]; Select[Partition[Prime[Range[134*10^4]],2,1],atpQ][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 28 2019 *)
%Y A178421 Cf. A069175, A014574, A069142, A099349.
%K A178421 nonn
%O A178421 1,1
%A A178421 _Vladimir Joseph Stephan Orlovsky_, May 27 2010