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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249628 Sums of two numbers that are the average of a twin prime pair (A014574). 3
8, 10, 12, 16, 18, 22, 24, 30, 34, 36, 42, 46, 48, 54, 60, 64, 66, 72, 76, 78, 84, 90, 102, 106, 108, 112, 114, 120, 126, 132, 138, 142, 144, 150, 154, 156, 162, 168, 174, 180, 184, 186, 192, 196, 198, 202, 204, 210, 216, 222, 228, 232, 234, 240, 244, 246, 252 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The addends need not be distinct, see example.

Probably a(n) ~ 6n and all multiples of 6 greater than 4206 are present. - Charles R Greathouse IV, Nov 06 2014

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

EXAMPLE

8 is in the sequence since 8 = 4+4 and 4 is the average of the twin primes 3 and 5.

10 is in the sequence since 10 = 4+6 and both 4 and 6 are the average of the twin primes 3,5 and 5,7 respectively.

12 is in the sequence since 12 = 6+6 and 6 is the average of the twin primes 5 and 7.

14 is not in the sequence since it is not the sum of two numbers that are the average of twin primes.

PROG

(PARI) v=[]; for(n=1, 10^3, if(isprime(n-1)&&isprime(n+1), v=concat(v, n)))

b=[]; for(n=1, 1000, for(k=1, n, if(vecsearch(v, k)&&vecsearch(v, n-k), b=concat(b, n)))); vecsort(b, , 8) \\ Derek Orr, Nov 02 2014

(PARI) list(lim)=my(v=List(), p, r); p=3; forprime(q=5, lim-3, if(q-p>2, p=q; next); r=3; forprime(s=5, min(lim-q+2, q), if(s-r==2, listput(v, p+s)); r=s); p=q); Set(v) \\ Charles R Greathouse IV, Nov 06 2014

(PARI) list(lim)=my(v=List(), P=primes([3, lim\1-3]), Q=v, t); for(i=2, #P, if(P[i]-P[i-1]==2, listput(Q, P[i]-1))); P=0; forstep(n=8, lim, 2, for(i=1, #Q, if(setsearch(Q, t=n-Q[i]), listput(v, n); break); if(t<Q[i], break))); Vec(v) \\ Charles R Greathouse IV, Nov 06 2014

(PARI) is(n)=my(p=3); forprime(q=5, n\2+1, if(isprime(n-p)&&isprime(n-p-2), return(1)); p=q); 0 \\ Charles R Greathouse IV, Nov 06 2014

CROSSREFS

Cf. A014574 (average of twin prime pairs).

Sequence in context: A161425 A096171 A154786 * A158273 A157939 A208154

Adjacent sequences:  A249625 A249626 A249627 * A249629 A249630 A249631

KEYWORD

nonn

AUTHOR

Wesley Ivan Hurt, Nov 02 2014

EXTENSIONS

Missing a(19) added by Charles R Greathouse IV, Nov 06 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 June 20 05:01 EDT 2019. Contains 324229 sequences. (Running on oeis4.)