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!)
A105455 Numbers n such that n*prime(n)+(n+1)*prime(n+1)+(n+2)*prime(n+2) is prime. 9
1, 6, 12, 20, 22, 24, 28, 30, 34, 56, 60, 142, 144, 148, 168, 192, 196, 230, 252, 260, 276, 282, 304, 322, 334, 344, 346, 352, 366, 374, 380, 386, 394, 404, 418, 424, 432, 440, 444, 470, 478, 484, 572, 590, 610, 612, 630, 642, 662, 684, 754, 766, 784, 790, 840, 842, 874, 886 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
n=1: 1*prime(1) + 2*prime(2) + 3*prime(3) = 1*2 + 2*3 + 3*5 = 23 prime,
n=6: 6*prime(6) + 7*prime(7) + 8*prime(8) = 6*13 + 7*17 + 8*19 = 349 prime. - Zak Seidov, Feb 18 2016
MATHEMATICA
bb={}; Do[If[PrimeQ[n Prime[n]+(n+1) Prime[n+1]+(n+2) Prime[n+2]], bb=Append[bb, n]], {n, 1, 400}]; bb
Select[Range@ 900, PrimeQ[# Prime[#] + (# + 1) Prime[# + 1] + (# + 2) Prime[# + 2]] &] (* Michael De Vlieger, Feb 05 2016 *)
PROG
(PARI) lista(nn) = {for(n=1, nn, if(ispseudoprime(n*prime(n)+(n+1)*prime(n+1)+(n+2)*prime(n+2)), print1(n, ", "))); } \\ Altug Alkan, Feb 05 2016
(Magma) [n: n in [1..1000] | IsPrime(n*NthPrime(n)+(n+1)*NthPrime(n+1)+(n+2)*NthPrime(n+2))]; // Vincenzo Librandi, Feb 06 2016
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
m, p, q, r = 1, 2, 3, 5
while True:
t = m*p + (m+1)*q + (m+2)*r
if isprime(t): yield m
m, p, q, r = m+1, q, r, nextprime(r)
print(list(islice(agen(), 58))) # Michael S. Branicky, May 17 2022
CROSSREFS
Sequence in context: A348914 A235268 A354931 * A345919 A246198 A083207
KEYWORD
nonn
AUTHOR
Zak Seidov, May 02 2005
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)