login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244066 Arithmetic mean of two consecutive twin primes that is also the arithmetic mean of two consecutive non-twin primes. 1
30, 42, 60, 105, 144, 165, 192, 228, 270, 312, 462, 570, 600, 858, 870, 882, 1026, 1092, 1230, 1254, 1290, 1302, 1428, 1482, 1620, 1878, 1998, 2028, 2340, 2550, 2688, 2730, 2760, 3345, 3540, 3582, 3627, 3795, 3885, 4020, 4338, 4500, 4518, 4650, 4755, 4788, 4866 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Intersection of A162734 (averages of consecutive non-twin primes) and A163656 (averages of consecutive twin primes).

a(n)/3 are: 10, 14, 20, 35, 48, ...

LINKS

Jens Kruse Andersen, Table of n, a(n) for n = 1..10000

EXAMPLE

30 is in this sequence because it is the arithmetic mean of 29 and 31, consecutive terms of A001097, as well as of 23 and 37, consecutive terms of A007510.

MATHEMATICA

Module[{prs=Prime[Range[800]], tp, nt}, tp=Flatten[Select[Partition[ prs, 2, 1], #[[2]]- #[[1]]==2&]]; nt=Complement[prs, tp]; Select[Tally[ Join[ Mean/@ Partition[tp, 2, 1], Mean/@Partition[nt, 2, 1]]], #[[2]]==2&][[All, 1]]] (* Harvey P. Dale, Sep 03 2016 *)

PROG

(PARI)

a244066(pmax) = {

  my(tp=[], m, j, k, s=[]);

  forprime(p=2, pmax, if(isprime(p-2) || isprime(p+2), tp=concat(tp, p)));

  for(i=1, #tp-1,

    m=(tp[i]+tp[i+1])\2;

    j=1; while(!(isprime(m+j) && !isprime(m+j-2) && !isprime(m+j+2)), j++);

    k=1; while(!(isprime(m-k) && !isprime(m-k-2) && !isprime(m-k+2)), k++);

    if(j==k, s=concat(s, m))

  );

  s

}

a244066(5000) \\ Colin Barker, Jul 18 2014

CROSSREFS

Cf. A014574, A007510. Subsequence of A163656.

Sequence in context: A302753 A179945 A136152 * A090815 A238367 A225228

Adjacent sequences:  A244063 A244064 A244065 * A244067 A244068 A244069

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Jun 19 2014

EXTENSIONS

Definition corrected by Antti Karttunen, Jun 21 2014.

Terms and definition corrected by Colin Barker, Jul 18 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 16 20:35 EDT 2019. Contains 328103 sequences. (Running on oeis4.)