login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062022 a(n) = Sum_{i<=j<=n} {prime(i) - prime(j)}^2. 1
0, 1, 14, 59, 256, 581, 1298, 2287, 4004, 7329, 11338, 17915, 26660, 36637, 49406, 67239, 91252, 117585, 151730, 191819, 235112, 289013, 350842, 425919, 521300, 628001, 740666, 865899, 997744, 1143501, 1345454, 1565639, 1815068, 2074761 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..34.

EXAMPLE

a(3) = (5-2)^2 + (5-3)^2 + (3-2)^2 = 14, sum of the squared differences of all pairs of the first 3 primes.

MAPLE

A062022 := proc(n)

    local a, i, j ;

    a := 0 ;

    for j from 1 to n do

        for i from 1 to j-1 do

            a := a+(ithprime(j)-ithprime(i))^2 ;

        end do:

    end do:

    a ;

end proc:

seq(A062022(n), n=1..10) ; # R. J. Mathar, Oct 03 2014

CROSSREFS

Sequence in context: A143861 A100174 A120371 * A277986 A261282 A158058

Adjacent sequences:  A062019 A062020 A062021 * A062023 A062024 A062025

KEYWORD

nonn

AUTHOR

Amarnath Murthy, Jun 02 2001

EXTENSIONS

More terms from Matthew Conroy, Jun 11 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 04:28 EDT 2020. Contains 337346 sequences. (Running on oeis4.)