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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A210185 Sum of distinct residues of all factorials mod prime(n). 2
 1, 3, 7, 12, 24, 56, 97, 103, 156, 224, 341, 494, 608, 521, 732, 821, 997, 1412, 1312, 1228, 1592, 1984, 2212, 2503, 2583, 3158, 3644, 3846, 3309, 4004, 5149, 5394, 6214, 6129, 7667, 6371, 8100, 8320, 8464, 9174, 10195, 10083, 11973, 11660, 12174, 11530, 14053 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Amiram Eldar, Table of n, a(n) for n = 1..2000 EXAMPLE Let n=4, p_4=7. We have modulo 7: 1!==1, 2!==2, 3!==6, 4!==3, 5!==1, 6!==6 and for m>=7, m!==0, such that we have 5 distinct residues 0,1,2,3,6. Therefore a(4)=0+1+2+3+6=12. MATHEMATICA Table[Total[Union[Mod[Range[Prime[n]]!, Prime[n]]]], {n, 100}] (* T. D. Noe, Mar 18 2012 *) PROG (PARI) a(n) = my(p=prime(n)); vecsum(Set(vector(p, k, k! % p))); \\ Michel Marcus, Dec 15 2018 CROSSREFS Cf. A000040, A000142, A210184. Sequence in context: A262567 A226229 A167491 * A280345 A062325 A301982 Adjacent sequences:  A210182 A210183 A210184 * A210186 A210187 A210188 KEYWORD nonn AUTHOR Vladimir Shevelev, Mar 18 2012 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.

Last modified March 28 07:59 EDT 2020. Contains 333079 sequences. (Running on oeis4.)