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.

A245757 Numbers n such that (k!+n)/k is never prime for any k.

This page as a plain text file.
%I A245757 #16 Jul 27 2020 07:35:53
%S A245757 5,7,11,13,14,17,19,21,23,26,29,31,34,37,39,41,43,47,48,50,53,54,55,
%T A245757 57,59,61,62,64,67,69,71,73,75,76,77,79,83,86,89,90,93,94,97,98,99,
%U A245757 101,103,107,109,110,111,113,118,119,122,125,127,128,129,131,134,137,139,141,142,143,146
%N A245757 Numbers n such that (k!+n)/k is never prime for any k.
%C A245757 k <= n for all n so k can only be a finite set of numbers.
%C A245757 Only k dividing n need be considered.
%C A245757 By Wilson's theorem, all primes > 3 are in the sequence. - _Robert Israel_, Jul 31 2014
%H A245757 Jens Kruse Andersen, <a href="/A245757/b245757.txt">Table of n, a(n) for n = 1..1000</a>
%e A245757 (1!+5)/1 = 6 is not prime.
%e A245757 (2!+5)/2 = 7/2 is not prime.
%e A245757 (3!+5)/3 = 11/3 is not prime.
%e A245757 (4!+5)/4 = 29/4 is not prime.
%e A245757 (5!+5)/5 = 25 is not prime.
%e A245757 For any k > 5, (k!+5)/k = (k-1)! + 5/k will always be a fraction and thus, never prime. So 5 is a member of this sequence.
%p A245757 filter:= proc(n) local k;
%p A245757   for k in numtheory:-divisors(n) do
%p A245757      if isprime((k!+n)/k) then return false fi
%p A245757   od:
%p A245757   true
%p A245757 end proc:
%p A245757 select(filter, [$1..1000]); # _Robert Israel_, Jul 31 2014
%t A245757 filterQ[n_] := AllTrue[Divisors[n], !PrimeQ[(#! + n)/#]&];
%t A245757 Select[Range[200], filterQ] (* _Jean-François Alcover_, Jul 27 2020 *)
%o A245757 (PARI)
%o A245757 a(n)=for(k=1,n,s=(k!+n)/k;if(floor(s)==s,if(ispseudoprime(s),return(k))))
%o A245757 n=1;while(n<200,if(!a(n),print1(n,", "));n++)
%Y A245757 Cf. A245756.
%K A245757 nonn
%O A245757 1,1
%A A245757 _Derek Orr_, Jul 31 2014