login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258817 a(n) = (!0 + !1 +... + !(n-1)) mod n. 1
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, 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, 29, 45, 0, 48, 31, 35, 0, 48, 33, 12, 0, 14, 35, 7, 0, 34, 37, 53 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
!n is a subfactorial number (A000166).
Property of the sequence: a(1) = a(7) = 0 and a(4k) = 0 for k=1,2,...
LINKS
FORMULA
a(n)= A173184(n) mod n.
EXAMPLE
a(5)= 3 because !0 + !1 + !2 + !3 + !4 = 1 + 0 + 1 + 2 + 9 = 13 == 3 mod 5.
MAPLE
A:= proc(n) option remember; if n<=1 then 1-n else (n-1)*(procname(n-1)+procname(n-2)); fi; end;
a:=n->n!*sum((-1)^k/k!, k=0..n):
lf:=n->add(A(k), k=0..n-1); [seq(lf(n) mod n, n=1..40)];
MATHEMATICA
Table[Mod[Total[Subfactorial[Range[0, n-1]]], n], {n, Range[80]}]
CROSSREFS
Sequence in context: A049799 A087985 A200927 * A004557 A088276 A099838
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 11 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)