|
|
A122264
|
|
a(n) = n + 1 + 2*Sum_{j=0..n-2} (j*prime(n-j+2) - (2*j-1)*prime(n-j+1) + (j-1)*prime(n-j)).
|
|
1
|
|
|
2, 7, 12, 25, 30, 43, 48, 61, 82, 87, 108, 121, 126, 139, 160, 181, 186, 207, 220, 225, 246, 259, 280, 309, 322, 327, 340, 345, 358, 411, 424, 445, 450, 487, 492, 513, 534, 547, 568, 589, 594, 631, 636, 649, 654, 699, 744, 757, 762, 775
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n + 1 + 2*Sum_{j=0..n-2} (j*prime(n-j+2) - (2*j-1)*prime(n-j+1) + (j-1)*prime(n-j)) with a(1) = 2.
|
|
MATHEMATICA
|
a[n_]:= n+1 +2*Sum[j*Prime[n-j+2] -(2*j-1)*Prime[n-j+1] +(j-1)*Prime[n -j], {j, 0, n-2}];
|
|
PROG
|
(Magma)
P:=NthPrime;
A122264:= func< n | n eq 1 select 2 else n+1+2*(&+[j*P(n-j+2) -(2*j-1)*P(n-j+1) +(j-1)*P(n-j) : j in [0..n-2]]) >;
(SageMath)
p=nth_prime
def A122264(n): return n+1 +2*sum(j*p(n-j+2) -(2*j-1)*p(n-j+1) +(j-1)*p(n-j) for j in range(n-1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|