A270441 Numbers n such that n^3+1 divides n!.
17, 31, 50, 68, 69, 75, 80, 101, 103, 122, 147, 155, 159, 160, 164, 170, 173, 179, 182, 212, 230, 231, 236, 257, 263, 264, 274, 278, 293, 302, 325, 327, 335, 353, 362, 373, 374, 381, 394, 407, 411, 424, 431, 437, 440, 451, 459, 467, 471, 472, 485, 491, 495, 500
Offset: 1
Keywords
Examples
a(1) = 17 because 17 is the least natural number n such that n^3+1 | n!.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A270441:=n->`if`(n! mod (n^3+1) = 0, n, NULL): seq(A270441(n), n=1..800); # Wesley Ivan Hurt, Apr 02 2016
-
Mathematica
For[n = 1, n <= 500, n++, If[Mod[n!, n^3 + 1] == 0, Print[n]]] Select[Range@ 500, Divisible[#!, #^3 + 1] &] (* Michael De Vlieger, Mar 17 2016 *)
-
PARI
isok(n) = (n! % (n^3+1)) == 0; \\ Michel Marcus, Mar 17 2016
-
PARI
my(f=1);for(n=2,10^3,f*=n;if(f%(n^3+1)==0,print1(n,", "))); \\ Joerg Arndt, Apr 03 2016
-
PARI
valp(n,p)=my(s); while(n>=p, s += n\=p); s is(n)=if(isprime(n+1), return(0)); my(f=factor(n^2-n+1)); for(i=1,#f~, if(valp(n,f[i,1])
Charles R Greathouse IV, Apr 04 2016 -
Python
from math import factorial for n in range(2,1000): if(factorial(n)%(n**3+1)==0):print(n) # Soumil Mandal, Apr 03 2016
Comments