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!)
A238848 Smallest k such that k*n^3 - 1 is prime. 2
3, 1, 2, 2, 4, 2, 14, 7, 6, 2, 4, 4, 14, 3, 4, 2, 16, 4, 12, 9, 2, 5, 16, 2, 2, 3, 16, 6, 10, 4, 2, 4, 22, 2, 6, 3, 6, 10, 6, 3, 22, 5, 2, 3, 4, 2, 18, 4, 26, 10, 4, 5, 6, 2, 2, 7, 6, 2, 10, 5, 2, 9, 4, 2, 16, 3, 6, 9, 2, 3, 30, 5, 14, 6, 24, 5, 16, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 3 because for k = 1, 1*(1^3) - 1 = 0 is not prime, for k = 2, 2*(1^3) - 1 = 1 is not prime, but for k = 3, 3*(1^3) - 1 = 2 is prime.
MATHEMATICA
sk[n_]:=Module[{k=1, n3=n^3}, While[!PrimeQ[k*n3-1], k++]; k]; Array[sk, 80] (* Harvey P. Dale, Jan 04 2023 *)
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
CROSSREFS
Sequence in context: A125266 A002016 A282016 * A117494 A342913 A221490
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)