login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257789 Numbers n such that 2n*prime(n) - 1 and 2n*prime(n) + 1 are both prime. 1
1, 2, 3, 24, 30, 33, 54, 90, 156, 168, 189, 225, 294, 300, 402, 576, 741, 780, 825, 849, 918, 948, 978, 1014, 1245, 1542, 1551, 1608, 1614, 1617, 1770, 1773, 1908, 1914, 1920, 1947, 2025, 2286, 2361, 2370, 2598, 2760, 2865, 2970, 3081, 3516, 3744, 3759, 3948, 4023 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) is divisible by 3 for n >= 3. - Robert Israel, May 08 2015

LINKS

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

EXAMPLE

2 is in this sequence because 2*2*prime(2) - 1 = 11 and 2*2*prime(2) + 1 = 13 are both prime.

MAPLE

filter:= proc(n)

local p;

p:= ithprime(n);

isprime(2*n*p+1) and isprime(2*n*p-1)

end proc:

select(filter, [1, 2, seq(3*j, j=1..10^5)]); # Robert Israel, May 08 2015

MATHEMATICA

Select[Range[3000], PrimeQ[2 # Prime[#] - 1] && PrimeQ[2 #  Prime[#] + 1] &] (* Vincenzo Librandi, May 09 2015 *)

Select[Range[4200], AllTrue[2# Prime[#]+{1, -1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 08 2018 *)

PROG

(MAGMA) [n: n in [1..4500] | IsPrime(2*n*NthPrime(n)-1) and IsPrime(2*n*NthPrime(n)+1)];

(PARI) v=List(); n=0; forprime(p=2, 1e5, n++; if(isprime(2*n*p-1) && isprime(2*n*p+1), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, May 08 2015

CROSSREFS

Cf. A085637.

Sequence in context: A037319 A032811 A092049 * A336616 A061778 A160667

Adjacent sequences:  A257786 A257787 A257788 * A257790 A257791 A257792

KEYWORD

nonn,easy

AUTHOR

Juri-Stepan Gerasimov, May 08 2015

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 November 30 20:17 EST 2021. Contains 349425 sequences. (Running on oeis4.)