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!)
A062020 Let P(n) = { 2,3,5,7,...,p(n) } where p(n) is n-th prime; then a(1) =0 and a(n) = Sum [mod{p(i) - p(j)}], for all i and j from 1 to n. 1
0, 1, 6, 17, 44, 81, 142, 217, 324, 485, 666, 913, 1208, 1529, 1906, 2373, 2936, 3533, 4238, 5019, 5840, 6787, 7822, 8995, 10360, 11825, 13342, 14967, 16648, 18445, 20662, 23003, 25536, 28135, 31074, 34083, 37308, 40755, 44354, 48187, 52260 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

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

FORMULA

a(n) = a(n-1) + n*p(n) - Sum_{i = 1..n} p(i). a(n) = 2a(n-1) + (n-1)*(p(n)-p(n-1)) - a(n-2).

EXAMPLE

a(3) = (5-2) + (5-3) + (3-2) = 6, P(3) = {2,3,5}.

CROSSREFS

Sequence in context: A171507 A099858 A232567 * A066183 A262297 A048746

Adjacent sequences:  A062017 A062018 A062019 * A062021 A062022 A062023

KEYWORD

nonn

AUTHOR

Amarnath Murthy, Jun 02 2001

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001

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 September 29 18:27 EDT 2020. Contains 337432 sequences. (Running on oeis4.)