This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A238847 Smallest k such that k*n^3 + 1 is prime. 2
 1, 2, 4, 3, 2, 2, 4, 15, 2, 3, 2, 2, 6, 3, 10, 3, 26, 3, 4, 2, 2, 15, 26, 7, 4, 2, 2, 6, 2, 2, 10, 2, 20, 4, 2, 3, 4, 3, 4, 6, 6, 4, 10, 2, 14, 16, 12, 3, 4, 9, 10, 6, 24, 3, 4, 6, 2, 3, 2, 2, 18, 6, 6, 3, 14, 5, 16, 9, 18, 3, 2, 2, 4, 3, 10, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS EXAMPLE a(1) = 1 because in order for k*(1^3)+1 to be the smallest prime, k must be 1 (1*(1^3)+1 = 2). a(2) = 2 because in order for k*(2^3)+1 to be the smallest prime, k must be 2 (2*(2^3)+1 = 17). a(3) = 4 because in order for k*(3^3)+1 to be the smallest prime, k must be 4 (4*(3^3)+1 = 109). MATHEMATICA sk[n_]:=Module[{k=1, n3=n^3}, While[!PrimeQ[k*n3+1], k++]; k]; Array[sk, 80] (* Harvey P. Dale, Aug 27 2014 *) Table[SelectFirst[Range[10^2], PrimeQ[# n^3 + 1] &], {n, 76}] (* Michael De Vlieger, Mar 27 2016, Version 10 *) PROG (Python) import sympy from sympy import isprime def f(n): ..for k in range(1, 10**3): ....if isprime(k*(n**3)+1): ......return k n = 1 while n < 10**3: ..print(f(n)) ..n += 1 (PARI) a(n) = {k=1; while(!isprime(k*n^3+1), k++); k; } \\ Altug Alkan, Mar 26 2016 CROSSREFS Cf. A034693, A035092. Sequence in context: A105972 A305024 A064134 * A011030 A005681 A049848 Adjacent sequences:  A238844 A238845 A238846 * A238848 A238849 A238850 KEYWORD nonn AUTHOR Derek Orr, Mar 06 2014 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.

Last modified January 18 16:40 EST 2019. Contains 319271 sequences. (Running on oeis4.)