login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161517 Sum of remainders of c mod k where k = 1, 2, 3, ..., c and c is the n-th composite number. 2
1, 3, 8, 12, 13, 17, 31, 36, 36, 47, 61, 70, 77, 85, 103, 112, 125, 124, 138, 167, 184, 197, 218, 198, 248, 269, 258, 284, 328, 339, 358, 374, 414, 420, 449, 454, 492, 529, 520, 553, 578, 586, 672, 693, 693, 738, 725, 799, 840, 835, 852, 956, 981, 992, 1049, 1036 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..56.

FORMULA

a(n) = (c mod (c-1)) + (c mod (c-2)) + ... + (c mod 3) + (c mod 2).

EXAMPLE

a(1) = 1 (= (4 mod 3) + 0);

a(2) = 3 (= (6 mod 5) + (6 mod 4) + 0 + 0);

a(3) = 8 (= (8 mod 7) + (8 mod 6) + (8 mod 5) + 0 + (8 mod 3) + 0), etc.

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: A004125 := proc(n) add( n mod k, k=1..n) ; end: A161517 := proc(n) local c; A004125( A002808(n)) ; end: seq(A161517(n), n=1..80) ; # R. J. Mathar, Aug 03 2009

PROG

(PARI) a(n)=my(c=n+n\log(n+1)); for(i=0, n-c+primepi(c), if(isprime(c++), i--)); sum(k=2, c, c%k) \\ Charles R Greathouse IV, Oct 12 2009

CROSSREFS

Cf. A002808, A004125.

Sequence in context: A050391 A288865 A331069 * A255199 A280239 A310284

Adjacent sequences:  A161514 A161515 A161516 * A161518 A161519 A161520

KEYWORD

nonn,easy

AUTHOR

Juri-Stepan Gerasimov, Jun 12 2009

EXTENSIONS

Corrected and extended by R. J. Mathar, Aug 03 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 21 18:05 EST 2020. Contains 332107 sequences. (Running on oeis4.)