login

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”).

A094264
a(n) = Sum_{r = 1..n} (n^r mod r).
3
0, 0, 1, 1, 4, 1, 6, 10, 12, 9, 20, 12, 27, 32, 28, 32, 57, 38, 50, 67, 65, 82, 75, 76, 84, 147, 101, 143, 151, 117, 157, 208, 205, 210, 204, 199, 231, 309, 274, 239, 236, 275, 257, 430, 336, 364, 367, 459, 322, 484, 480, 551, 465, 547, 556, 682, 616, 733, 592, 555, 493, 774
OFFSET
1,5
LINKS
MAPLE
f:= proc(n) local r; add(n &^ r mod r, r=1..n) end proc:
map(f, [$1..100]); # Robert Israel, Apr 17 2023
MATHEMATICA
Do[Print[Sum[Mod[n^r, r], {r, 1, n}]], {n, 1, 30}] (* Ryan Propper, Jul 10 2005 *)
CROSSREFS
Sequence in context: A338171 A333824 A083843 * A298829 A056140 A225419
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 26 2004
EXTENSIONS
More terms from Ryan Propper, Jul 10 2005
STATUS
approved