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.

A359556 Number of ways to represent the average of the n-th twin prime pair as arithmetic mean of the averages of two other twin prime pairs.

This page as a plain text file.
%I A359556 #12 Mar 31 2023 06:56:29
%S A359556 0,0,1,1,1,1,2,2,2,1,1,6,1,2,0,1,3,4,2,3,0,7,2,3,1,4,4,1,3,6,5,1,1,3,
%T A359556 4,6,1,11,6,7,3,6,2,10,5,4,4,6,4,2,1,7,1,4,5,4,4,4,8,7,2,3,4,3,3,10,9,
%U A359556 3,5,21,17,5,12,5,2,3,3,18,13,4,19,11,15,5
%N A359556 Number of ways to represent the average of the n-th twin prime pair as arithmetic mean of the averages of two other twin prime pairs.
%H A359556 Amiram Eldar, <a href="/A359556/b359556.txt">Table of n, a(n) for n = 1..1200</a>
%e A359556 a(4) = 1 because 18, the average of the 4th twin prime pair (17, 19), can be expressed in one way only as the arithmetic mean of the averages of two other twin prime pairs. These are (5, 7) and (29, 31) with their averages 6 and 30: (6 + 30)/2 = 36/2 = 18.
%e A359556 a(7) = 2 because 60, the average of the 7th twin prime pair (59, 61), can be expressed in two ways as the arithmetic mean of the averages of two other twin prime pairs. Firstly, by the averages 12 and 108 of the twin prime pairs (11, 13) and (107, 109), since (12 + 108)/2 = 120/2 = 60. Secondly, by the averages 18 and 102 of the twin prime pairs (17, 19) and (101, 103), as (18 + 102)/2 = 120/2 = 60 also.
%e A359556 a(15) = 0 because 198, the average of the 15th twin prime pair (197, 199), cannot be expressed as the arithmetic mean of the averages of any other two twin prime pairs.
%t A359556 means = Select[2*Range[3500], PrimeQ[# - 1] && PrimeQ[# + 1] &]; Count[(Plus @@@ Subsets[means, {2}])/2, #] & /@ Select[means, # < Max[means]/2 &] (* _Amiram Eldar_, Jan 06 2023 *)
%Y A359556 Cf. A014574, A071681.
%K A359556 nonn
%O A359556 1,7
%A A359556 _Tamas Sandor Nagy_, Jan 05 2023
%E A359556 More terms from _Amiram Eldar_, Jan 06 2023