login
A120416
Numbers k such that k^2+1 divides k!.
7
18, 21, 38, 43, 47, 57, 68, 70, 72, 73, 83, 99, 111, 117, 119, 123, 128, 132, 133, 142, 157, 172, 173, 174, 182, 185, 191, 192, 193, 200, 211, 212, 216, 233, 237, 239, 242, 251, 253, 255, 265, 268, 273, 278, 293, 294, 302, 305, 307, 313, 319, 322, 327, 336
OFFSET
1,1
COMMENTS
Let Product_j (p_j)^(e_j) be the prime factorization of n^2+1. Then n is in the sequence if and only if for each j, e_j <= Sum_{k>=1} floor(n/(p_j)^k). - Robert Israel, Nov 11 2016
There exist infinitely many natural numbers n such that n^2+1 divides n!, because 2*(5*k-2)^2 is a term for k > 0. - Jinyuan Wang, Feb 06 2019
There are 2082 terms up to 10^4, 22792 up to 10^5, 242421 up to 10^6, 2523043 up to 10^7. Perhaps the asymptotic density is 1 - log(2) = 30.68...%. - Jinyuan Wang, Feb 09 2019
LINKS
Hojoo Lee, Problem A 26, Problems in elementary number theory, 2003.
FORMULA
k such that A002522(k) | A000142(k).
EXAMPLE
For the first number, k=18: 18^2+1=325 divides 18!=6402373705728000.
MAPLE
select(t -> t! mod (t^2+1)=0, [$1..1000]); # Robert Israel, Nov 11 2016
MATHEMATICA
Select[Range@ 336, Divisible[#!, #^2 + 1] &] (* Jinyuan Wang, Feb 06 2019 *)
PROG
(PARI) isok(n) = (n! % (n^2+1) == 0) \\ Michel Marcus, Jul 23 2013
(PARI) valp(n, p)=my(s); while(n>=p, s += n\=p); s
is(n)=my(f=factor(n^2+1)); for(i=1, #f~, if(valp(n, f[i, 1])<f[i, 2], return(0))); 1 \\ Jinyuan Wang, Feb 06 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
R. J. Mathar, Jul 07 2006
STATUS
approved