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!)
A266225 Least x>1 such that prime(n)*x+x-1 is a prime, or -1 if no such x exists. 1
2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 4, 3, 2, 3, 4, 2, 3, 7, 4, 5, 6, 3, 2, 2, 3, 5, 3, 4, 4, 2, 3, 2, 6, 3, 3, 4, 4, 3, 3, 2, 2, 4, 2, 6, 3, 3, 7, 7, 3, 4, 2, 2, 4, 2, 3, 5, 3, 4, 6, 2, 7, 2, 4, 5, 3, 3, 4, 3, 6, 3, 3, 2, 3, 6, 7, 3, 4, 3, 4, 3, 2, 6, 2, 3, 3, 2, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: a(n) > 1.
LINKS
EXAMPLE
5*2+2-1=11 is a prime, therefore a(3)=2.
7*2+2-1=15 is not a prime, but 7*3+3-1=23 is a prime, so a(4)=3.
MATHEMATICA
lx[n_]:=Module[{x=2, p=Prime[n]}, While[!PrimeQ[p*x+x-1], x++]; x]; Array[ lx, 90] (* Harvey P. Dale, Jul 18 2020 *)
PROG
(Python)
from sympy import isprime
TOP=1000000
for p in range(2, 777):
if isprime(p):
failed = True
for x in range(2, TOP):
if isprime(p*x+x-1):
print str(x)+', ',
failed = False
break
if failed: print '-1, ',
(PARI) a(n) = {my(x = 2); while (!isprime(prime(n)*x+x-1), x++); x; } \\ Michel Marcus, Dec 27 2015; corrected Jun 13 2022
CROSSREFS
Sequence in context: A143299 A239428 A257497 * A248596 A076984 A079085
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Dec 24 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)