OFFSET

1,1

COMMENTS

a(n) is the sum of all elements of the n X n matrix M(i,j) = prime(i+1)+prime(j+1).

[For n<= 23, only five matrices (with n=1, n=2, n=3, n=5 and n=7) contain all the even numbers starting from 6 and ending with 2*prime(n+1), the maximum element. If the prime gap prime(n+1)-prime(n) is larger than 2, the even term 2*prime(n+1)-2 is missing in the matrix; the difference equal 2 between prime(n) and prime(n-1) is not a sufficient condition to have a complete set of even numbers in the range 6 .. 2*prime(n+1) in the matrix.]

LINKS

Andrew Howroyd, Table of n, a(n) for n = 1..1000

PROG

(Sage) A177082 = lambda n: 2*n*(sum(primes_first_n(n+1))-2) # D. S. McNeil, Dec 18 2010

(PARI) seq(n)={2*Vec(deriv((Ser(primes(n+1))-2)/(1-x)))} \\ Andrew Howroyd, Jan 14 2020

CROSSREFS

KEYWORD

nonn

AUTHOR

Giacomo Fecondo, Dec 09 2010

EXTENSIONS

Terms a(25) and beyond from Andrew Howroyd, Jan 14 2020

STATUS

approved