login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289357 Least number k such that n^2 + n - k is prime. 1
0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 5, 1, 11, 1, 1, 13, 5, 1, 1, 1, 3, 5, 1, 3, 1, 5, 1, 7, 1, 1, 5, 5, 3, 1, 5, 7, 1, 1, 3, 1, 5, 3, 1, 1, 1, 5, 1, 3, 1, 5, 3, 1, 1, 1, 1, 5, 9, 1, 1, 3, 17, 5, 1, 1, 1, 7, 1, 13, 1, 5, 19, 3, 19, 7, 1, 19, 11, 3, 7, 5, 3, 1, 11, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

a(A045546(n)) = 1.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A049711(A002378(n)). - Robert Israel, Jul 03 2017

MAPLE

0, seq(n^2 + n - prevprime(n^2+n), n=2..100); # Robert Israel, Jul 03 2017

MATHEMATICA

Table[k = 0; While[! PrimeQ[n^2 + n - k], k++]; k, {n, 85}] (* Michael De Vlieger, Jul 04 2017 *)

PROG

(PARI) for(n=1, 85, k={my(k=0); while(!isprime(n^2+n-k), k++); k; }; print1(k", "))

CROSSREFS

Cf. A002378, A045546, A049711, A161550 (resulting primes).

Sequence in context: A140334 A131324 A079724 * A111368 A140750 A028264

Adjacent sequences:  A289354 A289355 A289356 * A289358 A289359 A289360

KEYWORD

nonn

AUTHOR

Gionata Neri, Jul 03 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 30 17:21 EDT 2021. Contains 346359 sequences. (Running on oeis4.)