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!)
A266224 Least x such that prime(n)*x+x+1 is a prime, or -1 if no such x exists. 1
2, 1, 1, 2, 1, 2, 1, 2, 3, 1, 3, 5, 1, 2, 2, 2, 1, 5, 2, 1, 2, 3, 4, 2, 2, 1, 3, 1, 3, 2, 2, 3, 1, 2, 1, 3, 2, 5, 2, 2, 1, 3, 1, 2, 1, 2, 5, 2, 1, 2, 4, 1, 3, 3, 4, 5, 1, 5, 2, 1, 2, 3, 2, 1, 5, 10, 3, 2, 1, 2, 2, 5, 9, 3, 2, 2, 3, 2, 4, 2, 1, 5, 1, 3, 2, 4, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: a(n) > 0.

LINKS

Table of n, a(n) for n=1..87.

EXAMPLE

5*1+1+1=7 is a prime, therefore a(3)=1.

7*1+1+1=9 is not a prime, but 7*2+2+1=17 is a prime, so a(4)=2.

PROG

(Python)

from sympy import isprime

TOP=1000000

for p in range(2, 777):

    if isprime(p):

        failed = True

        for x in range(1, TOP):

            if isprime(p*x+x+1):

                print str(x)+', ',

                failed = False

                break

        if failed: print '-1, ',

(PARI) a(n) = {x = 1; while (!isprime(prime(n)*x+x+1), x++); x; } \\ Michel Marcus, Dec 27 2015

CROSSREFS

Cf. A000040, A266225.

Sequence in context: A321944 A065203 A230798 * A029396 A084746 A128259

Adjacent sequences:  A266221 A266222 A266223 * A266225 A266226 A266227

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 October 6 12:35 EDT 2022. Contains 357264 sequences. (Running on oeis4.)