The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A114235 Largest prime p < prime(n) such that 2*prime(n) + p is a prime. 9
3, 5, 7, 11, 13, 5, 13, 13, 17, 29, 31, 41, 43, 43, 31, 59, 59, 37, 53, 71, 73, 79, 89, 79, 101, 103, 89, 67, 113, 127, 127, 131, 103, 137, 149, 137, 157, 163, 163, 179, 181, 191, 193, 179, 197, 197, 223, 173, 211, 223, 227, 241, 229, 193, 223, 269, 269, 277, 263 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
LINKS
EXAMPLE
n=3: 2*prime(3)+3=2*5+3=13 is prime, so a(3)=3;
n=4: 2*prime(4)+5=2*7+5=19 is prime, so a(4)=5;
...
n=8: 2*prime(8)+17=2*19+17=55 is not prime
2*prime(8)+13=2*19+13=51 is not prime
...
2*prime(8)+5=2*19+5=43 is prime, so a(8)=5;
MATHEMATICA
Table[p1 = Prime[n1]; n2 = 1; p2 = Prime[n1 - n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; If[n2 >= n1, Print[n1]]; p2 = Prime[n1 - n2]]; p2, {n1, 3, 202}]
PROG
(Haskell)
a114235 n = head [p | let q = a000040 n,
p <- reverse $ takeWhile (< q) a000040_list,
a010051 (2 * q + p) == 1]
-- Reinhard Zumkeller, Oct 29 2013
CROSSREFS
Sequence in context: A249370 A282810 A102941 * A285848 A086527 A361445
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Nov 20 2005
EXTENSIONS
Edited definition to conform to OEIS style. - Reinhard Zumkeller, Oct 29 2013
STATUS
approved

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 May 31 01:18 EDT 2024. Contains 372980 sequences. (Running on oeis4.)