|
| |
|
|
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; internal format)
|
|
|
|
OFFSET
| 1,3
|
|
|
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: A047861 A171507 A099858 * A066183 A048746 A026382
Adjacent sequences: A062017 A062018 A062019 * A062021 A062022 A062023
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jun 02 2001
|
|
|
EXTENSIONS
| More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001
|
| |
|
|