|
|
A185382
|
|
Sum_{j=1..n-1} P(n)-P(j), where P(j) = A065091(j) is the j-th odd prime.
|
|
5
|
|
|
0, 2, 6, 18, 26, 46, 58, 86, 134, 152, 212, 256, 280, 332, 416, 506, 538, 640, 712, 750, 870, 954, 1086, 1270, 1366, 1416, 1520, 1574, 1686, 2092, 2212, 2398, 2462, 2792, 2860, 3070, 3286, 3434, 3662, 3896, 3976, 4386, 4470, 4642, 4730, 5270
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
It appears 1/3 of a(n) values are divisible by 3 (as measured up to n = 8000). Almost all of these cases occur consecutively (i.e., in "runs"). The sizes of these runs, including runs of 1, in the first 250 primes are given by this sequence: {2, 4, 1, 1, 2, 4, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 5, 6, 3, 2, 2, 3, 3, 9, 1, ..} with two runs up to 12 in length occurring in the first 5000 primes. - Richard R. Forberg, Mar 26 2015
a(n+1) == a(n) (mod 3) iff n == 0 (mod 3) or P(n+1) == P(n) (mod 3); this should have asymptotic probability 2/3, and explains some of the above comment. - Robert Israel, Mar 26 2015
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (n-1)*A065091(n) - A071148(n-1) = (n-1)*prime(n+1) - sum_{1 < k <= n} prime(k). [Corrected and extended by M. F. Hasler, May 02 2015]
|
|
EXAMPLE
|
a(4)=(11-3)+(11-5)+(11-7)=18.
|
|
MAPLE
|
N:= 1000: # to get terms for all odd primes <= N
P:= select(isprime, [seq(2*i+1, i=1..floor((N-1)/2))]):
Q:= ListTools[PartialSums](P):
|
|
MATHEMATICA
|
s[k_] := Prime[k + 1]; p[n_] := Sum[s[k], {k, 1, n}]; c[n_] := n*s[n] - p[n]; Table[c[n], {n, 2, 100}]
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|