Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A004125
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A004125 Sum of remainders of n mod k, for k = 1,2,3,...,n.
(Formerly M3213)
+0
19
0, 0, 1, 1, 4, 3, 8, 8, 12, 13, 22, 17, 28, 31, 36, 36, 51, 47, 64, 61, 70, 77, 98, 85, 103, 112, 125, 124, 151, 138, 167, 167, 184, 197, 218, 198, 233, 248, 269, 258, 297, 284, 325, 328, 339, 358, 403, 374, 414, 420, 449, 454, 505, 492, 529, 520, 553, 578, 635, 586, 645, 672 (list; graph; listen)
OFFSET

1,5

COMMENT

Let u_m(n)=sum(n^m mod k^m ,k=1..n) with m integer. As n-->+oo , u_m(n) ~ (n^(m+1)).(1-(1/(m+1)).Zeta(1+1/m)). Proof: using Riemann sums, we have u_m(n) ~ (n^(m+1)).int((1/x[nonascii character here]).(1-floor(x^m)/(x^m)),x=1..+oo) and the result follows. - Yalcin Aktar (aktaryalcin(AT)msn.com), Jul 30 2008

REFERENCES

Problem E2817, Amer. Math. Monthly, vol. 87 p 137 1980.

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

FORMULA

David W. Wilson observes that a(n) is (1-pi^2/12)n^2 + O(n). The O(n) appears to be about -.322 n.

a(n)=n^2-A024916(n), hence asymptotically a(n)=n^2*(1-Pi^2/12)+O(n*Log(n)) - Benoit Cloitre (benoit7848c(AT)orange.fr), Apr 28 2002

a(n) = n^2 - sum_{k=1..n} sigma(k) (from problem E2817), a(n+1) = a(n) + 2n+1 - sigma(n+1). - T. D. Noe, Oct 06 2006

sum(modp(n+j,j),j=1..n). - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Nov 07 2006

EXAMPLE

a(5) = 4. The remainder when 5 is divided by 2,3,4 respectively is 1,2,1 and their sum = 4.

MAPLE

A004125 := n -> add( pmod(n, k), k=2..n); /* much faster and unambiguous; "a mod b" may be mods(a, b) */ - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Nov 22 2007

PROGRAM

(PARI) A004125(n)=sum(k=2, n, n%k) - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Nov 22 2007

CROSSREFS

Cf. A050482, A023196.

Adjacent sequences: A004122 A004123 A004124 this_sequence A004126 A004127 A004128

Sequence in context: A134390 A021699 A131416 this_sequence A137924 A105185 A137503

KEYWORD

nonn,easy,nice

AUTHOR

njas, Jeffrey Shallit

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 7 14:39 EDT 2008. Contains 144666 sequences.


AT&T Labs Research