The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A305972 a(n) is the smallest number m such that both |2n-prime(m)| and |2n-prime(m+1)| are primes, where prime(k) is the k-th prime number. 0
 3, 4, 5, 2, 2, 3, 4, 2, 3, 6, 2, 3, 8, 32, 4, 21, 2, 3, 13, 9, 5, 11, 2, 3, 11, 9, 4, 16, 15, 6, 21, 2, 3, 11, 9, 5, 11, 2, 3, 18, 9, 5, 21, 97, 4, 21, 15, 6, 11, 15, 8, 11, 2, 3, 11, 2, 3, 21, 32, 4, 47, 30, 6, 18, 9, 8, 11, 9, 4, 11, 2, 3, 21, 32, 5, 21, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS In the sequence {a(n)}, the following 30 values of n are the only ones for which prime(a(n)+1) > 2n: 1, 2, 3, 14, 16, 19, 28, 31, 44, 59, 61, 62, 79, 103, 104, 106, 124, 163, 166, 209, 229, 239, 259, 272, 314, 404, 691, 859, 1483, 2011. Except for the above values of n, the number pairs (prime(a(n)), 2n-prime(a(n))) and (prime(a(n)+1), 2n-prime(a(n)+1)) are the Goldbach decompositions of 2n. LINKS EXAMPLE For n=1, 2n=2, both |2-5|=3 and |2-7|=5 are primes, and 5 is the 3rd prime, so a(1)=3; For n=4, 2n=8, both 8-3=5 and 8-5=3 are primes, and 3 is the 2nd prime, so a(4)=2; For n=13, 2n=26, both 26-prime(8)=26-19=7 and 26-prime(8+1)=26-23=3 are primes, and no smaller primes satisfy the definition, so a(13)=8. MATHEMATICA Table[k=1; i=2*n; p=Prime[k]; While[!((PrimeQ[i-p]) && (PrimeQ[i-NextPrime[p]])), k++; p=NextPrime[p]]; If[Prime[k+1]>i, AppendTo[s4, i]]; k, {n, 1, 77}] PROG (PARI) a(n) = {my(k=1); while (! (isprime(abs(2*n-prime(k))) && isprime(abs(2*n-prime(k+1)))), k++); k; } \\ Michel Marcus, Jun 22 2018 CROSSREFS Cf. A000040, A002375, A045917, A002372. Sequence in context: A247369 A009389 A091828 * A121845 A239639 A099816 Adjacent sequences:  A305969 A305970 A305971 * A305973 A305974 A305975 KEYWORD nonn,easy AUTHOR Lei Zhou, Jun 15 2018 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.

Last modified September 19 17:35 EDT 2021. Contains 347564 sequences. (Running on oeis4.)