|
|
A240568
|
|
Difference between n times the n-th prime and twice the sum of the first n primes.
|
|
1
|
|
|
-2, -4, -5, -6, -1, -4, 3, -2, 7, 32, 21, 50, 57, 40, 49, 86, 123, 96, 137, 142, 109, 156, 161, 210, 305, 304, 253, 254, 201, 204, 497, 490, 545, 472, 663, 582, 641, 700, 685, 746, 807, 708, 937, 830, 809, 700, 1041, 1382, 1347, 1216
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Rosser & Schoenfeld prove Robert Mandl's conjecture that a(n) > 0 for n > 8. - Charles R Greathouse IV, Jun 11 2015
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 3, the third prime is 5 and the sum of the first 3 primes is 10, so a(3) = -5
|
|
MAPLE
|
N:= 1000; # to use the primes up to N
Primes:= select(isprime, [$1..N]);
CPrimes:= Statistics:-CumulativeSum(Primes):
|
|
MATHEMATICA
|
a[n_] := a[n] = a[n-1] + (n-2) Prime[n] - (n-1) Prime[n-1]; a[1] = -2;
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|