login
Average of twin prime pairs that is a product of two averages of twin prime pairs.
2

%I #16 Apr 30 2019 21:51:34

%S 72,108,180,240,432,600,828,1152,1620,1872,2088,2592,3528,3852,4128,

%T 4932,4968,5280,6300,6552,6792,7488,7560,9000,9240,9720,10008,10332,

%U 11160,11700,12240,13008,13680,15288,16632,18540,20232,20772,20808,21492,25308,25800,26892

%N Average of twin prime pairs that is a product of two averages of twin prime pairs.

%C All terms == 0, 24, 36 or 48 (mod 72). - _Robert Israel_, Apr 30 2019

%H Robert Israel, <a href="/A307758/b307758.txt">Table of n, a(n) for n = 1..2451</a>

%e 108 = 6*18. 6 and 18 are both averages of twin prime pairs, so 108 is in the sequence.

%p N:= 10^5: # to get all terms <= N

%p P:= select(isprime, {seq(i,i=3..N+1,2)}):

%p TPA:= map(`+`,P,1) intersect map(`-`,P,1):

%p R:= select(t -> ormap(d -> member(t/d, TPA), TPA intersect numtheory:-divisors(t)), TPA):

%p sort(convert(R,list)); # _Robert Israel_, Apr 30 2019

%o (PARI) isok1(n) = isprime(n-1) && isprime(n + 1);

%o isok2(n) = fordiv(n, d, if (isok1(d) && isok1(n/d), return(1)););

%o isok(n) = isok1(n) && isok2(n); \\ _Michel Marcus_, Apr 27 2019

%Y Cf. A014574.

%K nonn

%O 1,1

%A _Dmitry Kamenetsky_, Apr 26 2019