|
|
A162733
|
|
Sum of remainders of the n-th composite mod k, for k=1,2,3,...,n.
|
|
1
|
|
|
0, 0, 2, 2, 3, 2, 10, 15, 15, 19, 25, 34, 41, 40, 58, 67, 80, 79, 83, 101, 118, 131, 152, 132, 170, 191, 180, 193, 223, 234, 253, 254, 294, 300, 329, 334, 356, 393, 384, 417, 442, 433, 501, 522, 522, 567, 554, 609, 650, 645, 642, 725, 750, 761, 818, 805, 833, 873
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(7)=10 because the 7th composite is 14 and its remainders modulo 1, 2, 3, 4, 5, 6, 7 are 0, 0, 2, 2, 4, 2, 0 respectively and 0 + 0 + 2 + 2 + 4 + 2 + 0 = 10.
|
|
MAPLE
|
A002808 := proc(n) local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; end if; end do; end if; end proc: A162733 := proc(n) local c; c := A002808(n) ; add(c mod k, k=1..n) ; end: seq(A162733(n), n=1..80) ; # R. J. Mathar, Aug 01 2009
|
|
MATHEMATICA
|
composite[n_] := FixedPoint[n + PrimePi[#] + 1 &, n + PrimePi[n] + 1];
a[n_] := Total[Mod[composite[n], #]& /@ Range[n]];
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,changed
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|