cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A065762 a(n) = (sum of first n primes)^2 + sum of (squares of first n primes).

Original entry on oeis.org

8, 38, 138, 376, 992, 2058, 4030, 6956, 11556, 19038, 28958, 43536, 63052, 87218, 118050, 158436, 210356, 271478, 347590, 438328, 542280, 667258, 812342, 983756, 1189396, 1423918, 1684302, 1977696, 2300336, 2660354, 3097234, 3582196, 4126908, 4718214
Offset: 1

Views

Author

Terrel Trotter, Jr., Dec 04 2001

Keywords

Examples

			a(4) = 376 because (2 + 3 + 5 + 7)^2 + (2^2 + 3^2 + 5^2 + 7^2) = 17^2 + (4 + 9 + 25 + 49) = 289 + 87 = 376.
		

Crossrefs

Programs

  • Mathematica
    nn=50;With[{prs=Prime[Range[nn]]},Table[Total[Take[prs,n]]^2+ Total[Take[prs,n]^2],{n,nn}]] (* Harvey P. Dale, Aug 20 2011 *)
  • PARI
    { s=ss=0; for (n=1, 500, p=prime(n); s+=p; ss+=p^2; write("b065762.txt", n, " ", s^2 + ss) ) } \\ Harry J. Smith, Oct 30 2009

Formula

a(n) = A007504(n)^2 + A024450(n). - Michel Marcus, Oct 12 2015

Extensions

More terms from Harvey P. Dale, Aug 20 2011

A263170 a(n) = (Sum_{k=1..n} prime(k))^3 - (Sum_{k=1..n} prime(k)^3).

Original entry on oeis.org

0, 90, 840, 4410, 20118, 64890, 186168, 440730, 972030, 2094330, 4013850, 7512570, 13279548, 21906810, 34902498, 54772410, 84444690, 124785210, 181983378, 259292154, 358930146, 492406650, 664548816, 889272570, 1186319550, 1559209530, 2012668266, 2568943290, 3232452450, 4031692410
Offset: 1

Views

Author

Altug Alkan, Oct 11 2015

Keywords

Comments

Obviously, a(n) is always an even number.
All a(n) are divisible by 6. - Robert Israel, Oct 16 2020

Examples

			For n = 2, a(2) = (2 + 3)^3 - (2^3 + 3^3) = 90.
		

Crossrefs

Cf. A007504, A098999. 3D analog of A065595.

Programs

  • Maple
    A263170 := proc(n)
        su := add(ithprime(i),i=1..n) ;
        su3 := add(ithprime(i)^3,i=1..n) ;
        su^3-su3 ;
    end proc: # R. J. Mathar, Oct 21 2015
  • Mathematica
    Table[Sum[Prime@ k, {k, n}]^3 - Sum[Prime[k]^3, {k, n}], {n, 30}] (* Michael De Vlieger, Oct 19 2015 *)
  • PARI
    a(n) = sum(k=1, n, prime(k))^3 - sum(k=1, n, prime(k)^3);

Formula

a(n) = A007504(n)^3 - A098999(n).
a(n) mod 2 = 0.
Showing 1-2 of 2 results.