login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270441 Numbers n such that n^3+1 divides n!. 4

%I

%S 17,31,50,68,69,75,80,101,103,122,147,155,159,160,164,170,173,179,182,

%T 212,230,231,236,257,263,264,274,278,293,302,325,327,335,353,362,373,

%U 374,381,394,407,411,424,431,437,440,451,459,467,471,472,485,491,495,500

%N Numbers n such that n^3+1 divides n!.

%C There exist infinitely many natural numbers n such that n^3+1 divides n!, because for k > 0, (3*k+1)^2 + 1 and 16*k^4 + 1 are terms. (Edited by _Jinyuan Wang_, Feb 05 2019)

%C There are 1738 members up to 10^4, 19912 up to 10^5, 216921 up to 10^6, 2299173 up to 10^7, and 23960698 up to 10^8. Perhaps the asymptotic density is 1 - log 2 = 30.68...%. - _Charles R Greathouse IV_, Apr 05 2016 (Edited by _Jinyuan Wang_, Feb 06 2019)

%H Charles R Greathouse IV, <a href="/A270441/b270441.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 17 because 17 is the least natural number n such that n^3+1 | n!.

%p A270441:=n->`if`(n! mod (n^3+1) = 0, n, NULL): seq(A270441(n), n=1..800); # _Wesley Ivan Hurt_, Apr 02 2016

%t For[n = 1, n <= 500, n++, If[Mod[n!, n^3 + 1] == 0, Print[n]]]

%t Select[Range@ 500, Divisible[#!, #^3 + 1] &] (* _Michael De Vlieger_, Mar 17 2016 *)

%o (PARI) isok(n) = (n! % (n^3+1)) == 0; \\ _Michel Marcus_, Mar 17 2016

%o (PARI) my(f=1);for(n=2,10^3,f*=n;if(f%(n^3+1)==0,print1(n,", "))); \\ _Joerg Arndt_, Apr 03 2016

%o (PARI) valp(n,p)=my(s); while(n>=p, s += n\=p); s

%o 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])<f[i,2], return(0))); 1 \\ _Charles R Greathouse IV_, Apr 04 2016

%o (Python)

%o from math import factorial

%o for n in range(2,1000):

%o if(factorial(n)%(n**3+1)==0):print(n)

%o # _Soumil Mandal_, Apr 03 2016

%Y Cf. A118742, A120416, A269665.

%K nonn

%O 1,1

%A _José Hernández_, Mar 17 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 02:57 EDT 2021. Contains 346282 sequences. (Running on oeis4.)