login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114228 Smallest number m such that prime(n)+2*prime(m) is a prime. 8

%I #5 Oct 31 2013 17:43:55

%S 1,2,1,2,1,2,1,2,4,2,1,2,1,2,2,4,2,1,6,2,1,2,4,1,2,1,2,1,4,1,2,4,3,4,

%T 2,2,1,2,2,4,3,2,1,4,7,5,1,2,1,2,8,3,2,2,2,4,2,1,6,3,4,1,2,1,4,2,3,2,

%U 1,2,4,2,2,1,2,12,1,8,3,4,3,6,2,1,2,4,1,2,1,12,11,1,14,1,2,4,6,7,2,3,2,2,8

%N Smallest number m such that prime(n)+2*prime(m) is a prime.

%C a(A114229(n)) = n for n >=1 and a(m) <> n for m < A114229(n). - _Reinhard Zumkeller_, Oct 31 2013

%H Reinhard Zumkeller, <a href="/A114228/b114228.txt">Table of n, a(n) for n = 2..10000</a>

%e prime(2)=3, 3+2*prime(1)=7 is prime, so a(2)=1;

%e prime(3)=5, 5+2*prime(2)=11 is prime, so a(3)=2;

%e ...

%e prime(20)=71, 71+2*prime(6)=97 is prime, so a(20)=6.

%t Table[p1 = Prime[n1]; n2 = 1; p2 = 2; While[ cp = p1 + 2*p2; ! PrimeQ[cp], n2++; p2 = Prime[n2]]; n2, {n1, 2, 201}]

%o (Haskell)

%o a114228 n = head [m | m <- [1..],

%o a010051 (a000040 n + 2 * a000040 m) == 1]

%o -- _Reinhard Zumkeller_, Oct 31 2013

%Y Cf. A114227.

%Y Cf. A010051, A000040.

%K easy,nonn

%O 2,2

%A _Lei Zhou_, Nov 18 2005

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)