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.

A242567 Least number k >= 0 such that (n!+k)/(n+k) is an integer.

This page as a plain text file.
%I A242567 #25 Dec 12 2024 02:52:36
%S A242567 1,1,0,1,18,1,712,5031,14,1,18,1,479001586,1719,87178291184,1,3024,1,
%T A242567 40,633,124748,1,86,51847,625793187628,123,20404,1,210,1,
%U A242567 265252859812191058636308479999968,755,263130836933693530167218012159999966
%N A242567 Least number k >= 0 such that (n!+k)/(n+k) is an integer.
%C A242567 a(n) = 1 iff n+1 is prime.
%C A242567 For n > 2, in order for (n!+k)/(n+k) to be an integer, the smallest integer possible is 2. Thus, a(n) <= n!-2n for all n > 2.
%C A242567 Let q = (n!+k)/(n+k). Then, k = (n!-n)/(q-1)-n. So, a(n) = d-n, where d is the smallest divisor (> n) of n!-n. (for all n >= 4) - _Hiroaki Yamanouchi_, Sep 29 2014
%H A242567 Hiroaki Yamanouchi, <a href="/A242567/b242567.txt">Table of n, a(n) for n = 1..79</a>
%e A242567 (6!+1)/(6+1) = 103 is an integer. Thus a(6) = 1.
%o A242567 (PARI) a(n)=for(k=1,10^5,s=(n!+k)/(n+k);if(floor(s)==s,return(k)));
%o A242567 n=1;while(n<100,print(a(n));n+=1)
%Y A242567 Cf. A006093.
%K A242567 nonn
%O A242567 1,5
%A A242567 _Derek Orr_, May 17 2014
%E A242567 a(13), a(15), a(21), a(25), a(31) and a(33) from _Hiroaki Yamanouchi_, Sep 29 2014