OFFSET
1,1
COMMENTS
a(38) > 2 * 10^9. - Hiroaki Yamanouchi, Sep 29 2014
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 1..37
EXAMPLE
If x = 6 we have 6 mod 1 + 6 mod 2 + 6 mod 3 + 6 mod 4 + 6 mod 5 + 6 mod 6 = 0 + 0 + 0 + 2 + 1 + 0 = 3 and 1 + 2 = 3 (k = 2).
If x = 15 we have 15 mod 1 + 15 mod 2 + ... + 15 mod 14 + 15 mod 15 = 0 + 1 + 0 + 3 + 0 + 3 + 1 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 = 36 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 (k = 8).
MAPLE
with(numtheory); P:=proc(q)local a, b, c, k, n;
for n from 1 to q do a:=add(n mod k, k=1..n); b:=n; c:=0;
while c<=a do if c=a then lprint(n, b); break; else b:=b+1;
c:=c+(b mod n); fi; od: od; end: P(10^9);
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Jun 27 2014
EXTENSIONS
a(18)-a(35) from Hiroaki Yamanouchi, Sep 29 2014
STATUS
approved