OFFSET
1,2
COMMENTS
These are also the numbers k such that k divides (k-1)!.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MAPLE
for n from 1 to 100 do
if irem(factorial(n-1), n) = 0 then print(n) end if;
end do: # Peter Bala, Jan 24 2017
MATHEMATICA
Select[ Range[ 1, 100 ], Mod[ (# - 1)!, # ] == 0 & ]
Join[{1}, Select[Range[5, 100], CompositeQ]] (* Harvey P. Dale, Jun 14 2024 *)
PROG
(Python)
from sympy import composite
def A056653(n): return composite(n) if n>1 else 1 # Chai Wah Wu, Jul 31 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Aug 30 2000
EXTENSIONS
Edited by Vladeta Jovovic, Apr 30 2003
STATUS
approved