The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A239135 Numbers k such that (k-1)*k^2 + 1 and k^2 + (k-1) are both prime. 3

%I

%S 2,3,5,6,8,13,21,24,26,28,35,45,48,50,55,76,83,89,93,96,100,101,115,

%T 120,138,140,148,149,181,191,195,203,206,209,215,230,258,259,281,285,

%U 294,301,309,323,330,349,358,373,380,386,393,395,423,428,433,474,495

%N Numbers k such that (k-1)*k^2 + 1 and k^2 + (k-1) are both prime.

%C Numbers k such that (k^3 - k^2 + 1)*(k^2 + k - 1) is semiprime.

%C Intersection of A045546 and A111501.

%C Primes in this sequence: 2, 3, 5, 13, 83, 89, 101, 149, 181, 191, ...

%H Daniel Starodubtsev, <a href="/A239135/b239135.txt">Table of n, a(n) for n = 1..10000</a>

%e 2 is in this sequence because (2-1)*2^2+1=5 and 2^2+(2-1)=5 are both prime.

%t Select[Range,PrimeQ[#^2+#-1]&&PrimeQ[#^2(#-1)+1]&] (* _Farideh Firoozbakht_, Mar 17 2014 *)

%o (MAGMA) k := 1;

%o for n in [1..10000] do

%o if IsPrime(k*(n - 1)*n^2 + 1) and IsPrime(k*n^2 + n - 1) then

%o n;

%o end if;

%o end for;

%Y Cf. A239115.

%K nonn

%O 1,1

%A _Ilya Lopatin_ following a suggestion from _Juri-Stepan Gerasimov_, Mar 15 2014

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.

Last modified July 28 00:54 EDT 2021. Contains 346316 sequences. (Running on oeis4.)