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!)
A156558 a(n) = Sum_{k=1..n} (n^k mod (n-k+1)). 4
0, 0, 0, 1, 1, 4, 1, 7, 5, 11, 10, 18, 11, 31, 22, 31, 39, 61, 51, 46, 55, 79, 73, 95, 84, 119, 122, 123, 118, 149, 82, 194, 186, 203, 182, 221, 169, 226, 257, 251, 287, 290, 242, 315, 338, 361, 420, 439, 399, 373, 362, 450, 616, 525, 536, 515, 514, 699, 669, 664 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
MAPLE
P:=proc(i) local a, n; for n from 0 by 1 to i do a:=sum('(n^k mod (n-k+1))', 'k'=1..n); print(a); od; end: P(100);
MATHEMATICA
Table[Sum[PowerMod[n, k, n-k+1], {k, n}], {n, 0, 60}] (* Harvey P. Dale, Dec 12 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, n^k%(n-k+1)); \\ Jinyuan Wang, Aug 02 2021
CROSSREFS
Sequence in context: A094649 A344970 A135857 * A082455 A140657 A348564
KEYWORD
nonn,easy
AUTHOR
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 April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)