editing
approved
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
editing
approved
With the exception of n=4, if n is composite, a(n) = 0. If n is prime, a(n) = n*(n-1). For example, a(11) = 11*10 = 110, a(41) = 41*40 = 1640. - Gary Detlefs, May 01 2010
approved
editing
editing
approved
editing
approved
a(n) = A174530(n)*(A174530(n)-1) for n>=5. - Filip Zaludek, Oct 13 2016
a(n) = A174530(n)*(A174530(n)-1) for n>=5. - Filip Zaludek, Oct 13 2016
_Roman Stawski (roman.stawski(AT)wanadoo.fr), _, Jul 05 2002
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
Table[Mod[n!, n^2], {n, 79}] (* or *)
Table[Which[n == 4, Mod[n!, n^2], PrimeQ@ n, n (n - 1), True, 0], {n, 79}] (* Michael De Vlieger, Oct 14 2016 *)
proposed
editing