cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A289357 Least number k such that n^2 + n - k is prime.

This page as a plain text file.
%I A289357 #20 Jul 04 2017 20:41:53
%S A289357 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,
%T A289357 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,
%U A289357 1,13,1,5,19,3,19,7,1,19,11,3,7,5,3,1,11,1
%N A289357 Least number k such that n^2 + n - k is prime.
%C A289357 a(A045546(n)) = 1.
%H A289357 Robert Israel, <a href="/A289357/b289357.txt">Table of n, a(n) for n = 1..10000</a>
%F A289357 a(n) = A049711(A002378(n)). - _Robert Israel_, Jul 03 2017
%p A289357 0, seq(n^2 + n - prevprime(n^2+n), n=2..100); # _Robert Israel_, Jul 03 2017
%t A289357 Table[k = 0; While[! PrimeQ[n^2 + n - k], k++]; k, {n, 85}] (* _Michael De Vlieger_, Jul 04 2017 *)
%o A289357 (PARI) for(n=1,85,k={my(k=0);while(!isprime(n^2+n-k),k++);k;};print1(k", "))
%Y A289357 Cf. A002378, A045546, A049711, A161550 (resulting primes).
%K A289357 nonn
%O A289357 1,7
%A A289357 _Gionata Neri_, Jul 03 2017