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.
%I A258817 #6 Jun 11 2015 09:47:09 %S A258817 0,1,2,0,3,3,0,0,8,5,4,0,9,7,8,0,13,9,4,0,14,11,14,0,3,13,17,0,25,15, %T A258817 4,0,26,17,28,0,30,19,35,0,4,21,9,0,8,23,32,0,7,25,47,0,30,27,48,0,23, %U A258817 29,45,0,48,31,35,0,48,33,12,0,14,35,7,0,34,37,53 %N A258817 a(n) = (!0 + !1 +... + !(n-1)) mod n. %C A258817 !n is a subfactorial number (A000166). %C A258817 Property of the sequence: a(1) = a(7) = 0 and a(4k) = 0 for k=1,2,... %F A258817 a(n)= A173184(n) mod n. %e A258817 a(5)= 3 because !0 + !1 + !2 + !3 + !4 = 1 + 0 + 1 + 2 + 9 = 13 == 3 mod 5. %p A258817 A:= proc(n) option remember; if n<=1 then 1-n else (n-1)*(procname(n-1)+procname(n-2)); fi; end; %p A258817 a:=n->n!*sum((-1)^k/k!, k=0..n): %p A258817 lf:=n->add(A(k), k=0..n-1);[seq(lf(n) mod n, n=1..40)]; %t A258817 Table[Mod[Total[Subfactorial[Range[0, n-1]]], n], {n, Range[80]}] %Y A258817 Cf. A000166, A173184. %K A258817 nonn %O A258817 1,3 %A A258817 _Michel Lagneau_, Jun 11 2015