login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226570 Sum_{k=1..n} (k+1)! mod n 1
0, 0, 2, 0, 2, 2, 4, 0, 8, 2, 10, 8, 8, 4, 2, 8, 11, 8, 7, 12, 11, 10, 19, 8, 12, 8, 8, 4, 15, 2, 0, 24, 32, 28, 32, 8, 3, 26, 8, 32, 2, 32, 14, 32, 17, 42, 16, 8, 46, 12, 11, 8, 11, 8, 32, 32, 26, 44, 26, 32, 20, 0, 53, 24, 47, 32, 63, 28, 65, 32, 66, 8, 53, 40, 62, 64, 32, 8, 18, 72, 62, 2, 25, 32, 62, 14, 44, 32, 74, 62, 60, 88, 62, 16, 7, 56, 78, 46, 98 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Motivated by sequence A100083, numbers such that a(n) = 0. - Hasler

Note that this is a different sequence from A086330: in this one, the factorials are added up and then the remainder of the total divided by n is taken, whereas in A086330 each factorial is computed modulo n prior to being added up. - Alonso del Arte, Jun 11 2013

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

EXAMPLE

a(3) = 2 because 2!, 3! and 4! are 2, 6 and 24 respectively, which add up to 32, and modulo 3 that is 2.

a(4) = 0 because 2!, 3!, 4! and 5! add up to 152, and modulo 4 that is 0 (note that this is different from A086330(4) = 4.

MATHEMATICA

Table[Mod[Sum[(k + 1)!, {k, n}], n], {n, 75}] (* Alonso del Arte, Jun 11 2013 *)

PROG

(PARI) a(n)=lift(sum(m=2, n-1, Mod(m!, n)))

(PARI) a(n)=my(t=Mod(1, n)); lift(sum(m=2, n+1, t*=m)) \\ Charles R Greathouse IV, Jun 11 2013

CROSSREFS

Cf. A086330, A100083, A007489, A003422.

Sequence in context: A029906 A094907 A343401 * A158380 A051734 A157898

Adjacent sequences:  A226567 A226568 A226569 * A226571 A226572 A226573

KEYWORD

nonn

AUTHOR

M. F. Hasler, Jun 11 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 13:26 EDT 2021. Contains 343666 sequences. (Running on oeis4.)