

A305972


a(n) is the smallest number m such that both 2nprime(m) and 2nprime(m+1) are primes, where prime(k) is the kth 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)), 2nprime(a(n))) and (prime(a(n)+1), 2nprime(a(n)+1)) are the Goldbach decompositions of 2n.


LINKS

Table of n, a(n) for n=1..77.


EXAMPLE

For n=1, 2n=2, both 25=3 and 27=5 are primes, and 5 is the 3rd prime, so a(1)=3;
For n=4, 2n=8, both 83=5 and 85=3 are primes, and 3 is the 2nd prime, so a(4)=2;
For n=13, 2n=26, both 26prime(8)=2619=7 and 26prime(8+1)=2623=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[ip]) && (PrimeQ[iNextPrime[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*nprime(k))) && isprime(abs(2*nprime(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



