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.

A120416 Numbers k such that k^2+1 divides k!.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Jul 07 2006

Keywords

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

Examples

			For the first number, k=18: 18^2+1=325 divides 18!=6402373705728000.
		

Crossrefs

Programs

  • 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 *)
  • 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])Jinyuan Wang, Feb 06 2019

Formula

k such that A002522(k) | A000142(k).