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.

A240160 Least number k such that (k!-n)/k is prime, or 0 if no such k exists.

This page as a plain text file.
%I A240160 #13 Aug 05 2014 02:33:48
%S A240160 0,0,0,4,5,0,7,8,0,0,0,4,13,0,15,4,0,0,0,0,0,0,0,0,5,0,0,0,0,0,31,0,
%T A240160 33,34,5,0,0,0,39,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,
%U A240160 6,0,0,0,0,0,0,0,0,0,0,7,6,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5
%N A240160 Least number k such that (k!-n)/k is prime, or 0 if no such k exists.
%C A240160 For a(n) > 0, a(n) is a divisor of n.
%C A240160 If a(n) = n, then n - 1 is in A002982.
%H A240160 Jens Kruse Andersen, <a href="/A240160/b240160.txt">Table of n, a(n) for n = 1..2500</a>
%o A240160 (PARI)
%o A240160 a(n)=for(k=1,n,s=(k!-n)/k;if(floor(s)==s,if(ispseudoprime(s),return(k))))
%o A240160 vector(150, n, a(n))
%Y A240160 Cf. A002982, A240161, A245756.
%K A240160 nonn
%O A240160 1,4
%A A240160 _Derek Orr_, Aug 01 2014
%E A240160 Typo in PARI code fixed by _Colin Barker_, Aug 02 2014