login
Value of k pertaining to A092927: value of k such that n(n-1)(n-2)...(n-k)+1 is the least prime of this form; a(n)=-1 if no such k exists, i.e., A092927(n)=0.
5

%I #6 Jul 28 2017 23:41:04

%S 0,0,1,0,2,0,1,2,1,0,2,0,1,7,1,0,12,0,-1,2,1,0,2,5,1,2,2,0,7,0,5,2,12,

%T 1,8,0,4,5,1,0,22,0,2,4,14,0,9,7,5,5,1,0,2,4,1,13,6,0,25,0,5,9,1,5,4,

%U 0,1,4,8,0,10,0,5,8,5,1,4,0,1,12,1,0,7,5,2,2,7,0,12,1,1,8,2,4,5,0,8,7,14,0

%N Value of k pertaining to A092927: value of k such that n(n-1)(n-2)...(n-k)+1 is the least prime of this form; a(n)=-1 if no such k exists, i.e., A092927(n)=0.

%C Subsidiary sequence: First occurrence of n in this sequence. 1,3,5,...

%e a(8) = 2 as 8*7*6 + 1 = 337 is the least prime of this form.

%o (PARI) f(n,k)=prod(i=n-k,n,i)+1; a(n)=for (i=0,n,if(isprime(f(n,i)),print1(i); break()))

%Y Cf. A092925, A092926, A092927.

%K sign

%O 1,5

%A _Amarnath Murthy_, Mar 18 2004

%E More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 19 2004

%E Corrected and extended by _Ray Chandler_, Mar 23 2004